提交 72ecd06c 编写于 作者: A Arnaud Héritier

Maven Best Practice : Always define plugins versions in the pluginManagement of the root POM

上级 3c88fc56
......@@ -13,6 +13,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -33,7 +34,7 @@
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<version>1.10</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......
......@@ -48,7 +48,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.hudson.tools</groupId>
<artifactId>maven-encoding-plugin</artifactId>
<version>1.1</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -61,7 +61,7 @@ THE SOFTWARE.
<plugin>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector</artifactId>
<version>1.4</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -73,6 +73,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
<dependencies>
<dependency>
......@@ -89,7 +90,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<version>1.10</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -105,7 +106,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke</groupId>
<artifactId>access-modifier-checker</artifactId>
<version>1.0</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -117,7 +118,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>antlr-maven-plugin</artifactId>
<version>2.1</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>cron</id>
......@@ -144,6 +145,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
<artifactId>maven-antrun-extended-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<phase>generate-resources</phase>
......@@ -181,6 +183,7 @@ THE SOFTWARE.
</plugin>
<plugin><!-- set main class -->
<artifactId>maven-jar-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<archive>
<manifest>
......@@ -198,7 +201,7 @@ THE SOFTWARE.
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-4</version>
<!-- version specified in grandparent pom -->
<configuration>
<force>true</force><!-- disable staleness check -->
<factory>org.jvnet.hudson.tools.ExtensionPointListerFactory</factory>
......@@ -246,7 +249,7 @@ THE SOFTWARE.
<plugin><!-- execute apt:process for "Extension points" Wiki page generation -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -263,6 +266,7 @@ THE SOFTWARE.
-->
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -308,6 +312,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<!-- run unit test -->
<execution>
......@@ -327,6 +332,7 @@ THE SOFTWARE.
<plugin>
<!-- unit tests are run by GMaven through Ant. -->
<artifactId>maven-surefire-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<skipTests>true</skipTests>
</configuration>
......
......@@ -339,12 +339,13 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<version>1.8</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -360,6 +361,7 @@ THE SOFTWARE.
<plugin><!-- generate licenses.xml -->
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<generateLicenseXml>target/${project.artifactId}/WEB-INF/licenses.xml</generateLicenseXml>
</configuration>
......@@ -367,6 +369,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
<artifactId>maven-antrun-extended-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>resgen</id>
......@@ -397,7 +400,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.4-apb-SNAPSHOT</version>
<!-- version specified in grandparent pom -->
<inherited>true</inherited>
<configuration>
<formats>
......
......@@ -157,7 +157,7 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>test-in-groovy</id>
......@@ -178,6 +178,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<systemProperties>
<property>
......@@ -190,7 +191,7 @@
<plugin>
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.3</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......
......@@ -106,6 +106,11 @@ THE SOFTWARE.
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
......@@ -179,6 +184,68 @@ THE SOFTWARE.
</execution>
</executions>
</plugin>
<plugin>
<!-- see http://maven-junit-plugin.kenai.com/ for more info -->
<groupId>org.kohsuke</groupId>
<artifactId>maven-junit-plugin</artifactId>
<version>1.9</version>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<version>1.10</version>
</plugin>
<plugin>
<groupId>org.jvnet.hudson.tools</groupId>
<artifactId>maven-encoding-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>antlr-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.4-apb-SNAPSHOT</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<!-- this is really just a patched version of maven-jetty-plugin to workaround issue #932 -->
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-jenkins-dev-plugin</artifactId>
<version>6.1.26-jenkins-1</version>
</plugin>
<plugin>
<groupId>org.jvnet.updatecenter2</groupId>
<artifactId>maven-makepkgs-plugin</artifactId>
<version>0.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
</plugin>
</plugins>
</pluginManagement>
......
......@@ -44,7 +44,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.1</version>
<!-- version specified in grandparent pom -->
<configuration>
<threshold>High</threshold>
</configuration>
......@@ -52,7 +52,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
<!-- version specified in grandparent pom -->
<configuration>
<!--rulesets>
<ruleset>ruleset.xml</ruleset>
......@@ -62,6 +62,7 @@ THE SOFTWARE.
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<archive>
<manifest>
......@@ -91,6 +92,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
<artifactId>maven-antrun-extended-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>generate-resources</id>
......
......@@ -48,11 +48,12 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<version>1.15</version>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<skip>true</skip>
<!-- tests now run by maven-junit-plugin -->
......@@ -61,7 +62,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5-patch-2</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>preset-packager</id>
......@@ -187,7 +188,7 @@ THE SOFTWARE.
<!-- see http://maven-junit-plugin.kenai.com/ for more info -->
<groupId>org.kohsuke</groupId>
<artifactId>maven-junit-plugin</artifactId>
<version>1.9</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -242,6 +243,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<!-- run unit test -->
<execution>
......@@ -259,14 +261,6 @@ THE SOFTWARE.
</execution>
</executions>
</plugin>
<plugin>
<!-- unit tests are run by GMaven through Ant. -->
<groupId>com.sun.maven</groupId>
<artifactId>maven-junit-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
......
......@@ -92,13 +92,13 @@ THE SOFTWARE.
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<version>1.15</version>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<version>1.8</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......
......@@ -44,7 +44,7 @@ THE SOFTWARE.
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
<!-- version specified in grandparent pom -->
<configuration>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<webResources>
......@@ -68,6 +68,7 @@ THE SOFTWARE.
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<phase>generate-resources</phase>
......@@ -83,6 +84,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
<artifactId>maven-antrun-extended-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>package</id>
......@@ -135,6 +137,7 @@ THE SOFTWARE.
<plugin><!-- generate licenses.xml -->
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<generateLicenseXml>target/classes/META-INF/licenses.xml</generateLicenseXml>
<inlineScript>
......@@ -152,7 +155,7 @@ THE SOFTWARE.
<!-- this is really just a patched version of maven-jetty-plugin to workaround issue #932 -->
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-jenkins-dev-plugin</artifactId>
<version>6.1.26-jenkins-1</version>
<!-- version specified in grandparent pom -->
<configuration>
<contextPath>${contextPath}</contextPath>
<!--
......@@ -316,7 +319,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.jvnet.updatecenter2</groupId>
<artifactId>maven-makepkgs-plugin</artifactId>
<version>0.3</version>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
......@@ -341,6 +344,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<!-- sign the war -->
<execution>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册