e-gineering / gitflow-helper-maven-plugin

An extension and plugin that teaches Maven to work well with gitflow projects and CI servers.
Apache License 2.0
76 stars 21 forks source link

Allow specific executions in the master build branch #136

Open rhierlmeier opened 1 year ago

rhierlmeier commented 1 year ago

With PR #129 it is now possible to define Maven plugins that can be executed during the build of the master build. However when this Maven plugin has different executions then all executions are executed.

Suggestion:

Introduces the configuration options retainExecutions. The retainExecutions is a list of strings. Each string has the format <groupId>:<artifactId>:<excutionId> All Executions that are not defined in this options are not executed during the master build.

Example:

<plugin>
    <groupId>com.e-gineering</groupId>
    <artifactId>gitflow-helper-maven-plugin</artifactId>
    <configuration>
      <retainExecutions>
        <retainExecution>org.codehaus.mojo:flatten-maven-plugin:flatten-in-master</retainExecution>
      </retainExecutions>
    </configuration>
  </plugin>  
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>flatten-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>flatten-in-master</id>
      <goals>
        <goal>flatten</goal>
      </goals>
      <phase>process-resources</phase>
    </execution>
      <id>flatten-other</id>
      <goals>
        <goal>flatten</goal>
      </goals>
      <phase>process-resources</phase>
    </execution>
  </executions>  
</plugin>