Class CodeRemoverContributor

java.lang.Object
ch.admin.bit.jeap.initializer.contributor.CodeRemoverContributor
All Implemented Interfaces:
ProjectContributor, org.springframework.core.Ordered

@Component public class CodeRemoverContributor extends Object implements ProjectContributor
This Contributor removes all code blocks that should not be part of generated projects, for instance:
 // START INITIALIZER DELETE
  ...
 // END INITIALIZER DELETE
 
 invalid input: '&lt'!-- START INITIALIZER DELETE -->
 invalid input: '&lt'!-- END INITIALIZER DELETE -->
 
  • Constructor Details

    • CodeRemoverContributor

      @Autowired public CodeRemoverContributor(JeapInitializerProperties properties)
    • CodeRemoverContributor

      public CodeRemoverContributor(String blockName, Pattern sourceFilesPattern)
  • Method Details

    • contribute

      public void contribute(Path projectRoot, ProjectRequest projectRequest, ProjectTemplate template)
      Description copied from interface: ProjectContributor
      This method will be called after the initial code has been checked out from Git. Your custom logic has to be implemented here and should do the required changes to files and folders under 'projectRoot'

      The ordering of execution can be set by overriding the getOrder() method.

      Specified by:
      contribute in interface ProjectContributor
      Parameters:
      projectRoot - a Path containing the root project folder
      projectRequest - the project request containing the input data
      template - the project template