Move license generation to profile
</configuration>
</plugin>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <version>${dockerfile-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>default</id>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ <configuration>
+ <skip>${docker.skip}</skip>
+ <buildArgs>
+ <ARTIFACT_ID>${project.artifactId}</ARTIFACT_ID>
+ <STREAMS_VERSION>${project.version}</STREAMS_VERSION>
+ <DOCKER_REGISTRY>${docker.registry}</DOCKER_REGISTRY>
+ </buildArgs>
+ <tag>${docker.tag}</tag>
+ <repository>${docker.registry}confluentinc/${project.artifactId}</repository>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>licenses</id>
+ <activation>
+ <property>
+ <name>env.BUILD_NUMBER</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<arguments>
<!-- Note use of development instead of package so we pick up all dependencies.
This assumes both subprojects will be packaged together. -->
- <argument>-i ${project.build.directory}/${project.build.finalName}-package/share/java/${artifactId}</argument>
+ <argument>-i ${project.build.directory}/${project.build.finalName}-package/share/java/${project.artifactId}</argument>
<argument>-f</argument>
<argument>-h ${project.build.directory}/${project.build.finalName}-package/share/doc/${project.artifactId}/licenses.html</argument>
<argument>-l ${project.build.directory}/${project.build.finalName}-package/share/doc/${project.artifactId}/licenses</argument>
</dependency>
</dependencies>
</plugin>
-
- <plugin>
- <groupId>com.spotify</groupId>
- <artifactId>dockerfile-maven-plugin</artifactId>
- <version>${dockerfile-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>default</id>
- <goals>
- <goal>build</goal>
- </goals>
- <configuration>
- <skip>${docker.skip}</skip>
- <buildArgs>
- <ARTIFACT_ID>${project.artifactId}</ARTIFACT_ID>
- <STREAMS_VERSION>${project.version}</STREAMS_VERSION>
- <DOCKER_REGISTRY>${docker.registry}</DOCKER_REGISTRY>
- </buildArgs>
- <tag>${docker.tag}</tag>
- <repository>${docker.registry}confluentinc/${project.artifactId}</repository>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
</plugins>
-
</build>
-
+ </profile>
+ </profiles>
</project>
