Skip to content

Commit

Permalink
multirelease: Disable maven-jar-plugin for POM artifacts
Browse files Browse the repository at this point in the history
maven-install-plugin 3.1.2 changed its behavior when trying to run
maven-jar-plugin on <type>pom</type> artifacts. This broke our
multirelease configuration.

Disable maven-jar-plugin for these artifacts (using a profile activated
by the "packaging" property).

Also disable our specific invocation of the maven-jar-plugin if the jar
would be empty, just in case.

https://issues.apache.org/jira/browse/MINSTALL-201
  • Loading branch information
kohlschuetter committed Aug 15, 2024
1 parent 75c2f63 commit cb18e35
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions kohlschutter-parent-multirelease/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
</goals>
<phase>${kohlschutter.multirelease.jar.phase}</phase>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
Expand All @@ -392,6 +393,28 @@
</build>
</profile>

<profile>
<id>disable-jar-plugin-for-pom</id>
<activation>
<property>
<name>packaging</name>
<value>pom</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
<classifier>disabled</classifier><!-- just in case -->
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>multirelease-java9</id>
<activation>
Expand Down

0 comments on commit cb18e35

Please sign in to comment.