Specify Maven plugin versions only in root POM

This commit is contained in:
filoghost 2020-05-16 12:30:33 +02:00
parent 832e566038
commit b1c2f77bc7
2 changed files with 43 additions and 29 deletions

View File

@ -147,38 +147,38 @@
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<!-- Appends build number to plugin version on SNAPSHOT builds. -->
<execution>
<id>set-plugin-version</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<property environment="env" />
<condition property="project.pluginVersion" value="${project.version}-b${env.BUILD_NUMBER}" else="${project.version}">
<and>
<isset property="env.BUILD_NUMBER" />
<contains string="${project.version}" substring="SNAPSHOT" />
</and>
</condition>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Appends build number to plugin version on SNAPSHOT builds. -->
<execution>
<id>set-plugin-version</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<property environment="env" />
<condition property="project.pluginVersion" value="${project.version}-b${env.BUILD_NUMBER}" else="${project.version}">
<and>
<isset property="env.BUILD_NUMBER" />
<contains string="${project.version}" substring="SNAPSHOT" />
</and>
</condition>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
@ -190,10 +190,10 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.3</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>

14
pom.xml
View File

@ -180,6 +180,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
@ -193,6 +194,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<sourceFileIncludes>
<include>**/holographicdisplays/api/**/*.java</include>
@ -203,6 +205,18 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>