You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2014/11/18 23:28:56 UTC

svn commit: r1640441 - in /maven/plugins/trunk/maven-deploy-plugin: ./ src/main/java/org/apache/maven/plugin/deploy/

Author: khmarbaise
Date: Tue Nov 18 22:28:56 2014
New Revision: 1640441

URL: http://svn.apache.org/r1640441
Log:
[MDEPLOY-191] Upgrade to maven-plugins parent version 27
 - Cleaned up pom accordingly to let the parent do it's work.
 - Fixed checkstyle reported issues.

Modified:
    maven/plugins/trunk/maven-deploy-plugin/pom.xml
    maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java
    maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
    maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java
    maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployRequest.java

Modified: maven/plugins/trunk/maven-deploy-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/pom.xml?rev=1640441&r1=1640440&r2=1640441&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-deploy-plugin/pom.xml Tue Nov 18 22:28:56 2014
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-plugins</artifactId>
-    <version>25</version>
+    <version>27</version>
     <relativePath>../maven-plugins/pom.xml</relativePath>
   </parent>
 
@@ -59,7 +59,6 @@ under the License.
 
   <properties>
     <mavenVersion>2.2.1</mavenVersion>
-    <mavenPluginPluginVersion>3.2</mavenPluginPluginVersion>
   </properties>
 
   <dependencies>
@@ -87,7 +86,6 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
-      <version>${mavenPluginPluginVersion}</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
@@ -122,37 +120,6 @@ under the License.
     </contributor>
   </contributors>
   
-  <build>
-
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-plugin-plugin</artifactId>
-          <version>${mavenPluginPluginVersion}</version>
-          <configuration>
-            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
-          </configuration>
-          <executions>
-            <execution>
-              <id>mojo-descriptor</id>
-              <phase>process-classes</phase>
-              <goals>
-                <goal>descriptor</goal>
-              </goals>
-            </execution>
-            <execution>
-              <id>help-goal</id>
-              <goals>
-                <goal>helpmojo</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-
   <profiles>
     <profile>
       <id>run-its</id>

Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java?rev=1640441&r1=1640440&r2=1640441&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java Tue Nov 18 22:28:56 2014
@@ -138,12 +138,12 @@ public abstract class AbstractDeployMojo
     {
         return updateReleaseInfo;
     }
-    
+
     int getRetryFailedDeploymentCount()
     {
         return retryFailedDeploymentCount;
     }
-    
+
     /**
      * Deploy an artifact from a particular file.
      * 
@@ -166,7 +166,8 @@ public abstract class AbstractDeployMojo
             {
                 if ( count > 0 )
                 {
-                    getLog().info( "Retrying deployment attempt " + ( count + 1 ) + " of " + retryFailedDeploymentCounter );
+                    getLog().info( "Retrying deployment attempt " + ( count + 1 ) + " of "
+                                       + retryFailedDeploymentCounter );
                 }
                 getDeployer().deploy( source, artifact, deploymentRepository, localRepository );
                 exception = null;

Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java?rev=1640441&r1=1640440&r2=1640441&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java Tue Nov 18 22:28:56 2014
@@ -383,7 +383,8 @@ public class DeployFileMojo
         {
             try
             {
-                deploy( attached.getFile(), attached, deploymentRepository, getLocalRepository(), getRetryFailedDeploymentCount() );
+                deploy( attached.getFile(), attached, deploymentRepository, getLocalRepository(),
+                        getRetryFailedDeploymentCount() );
             }
             catch ( ArtifactDeploymentException e )
             {

Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java?rev=1640441&r1=1640440&r2=1640441&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java Tue Nov 18 22:28:56 2014
@@ -59,9 +59,9 @@ public class DeployMojo
      * When building with multiple threads, reaching the last project doesn't have to mean that all projects are ready
      * to be deployed
      */
-    private static final AtomicInteger readyProjectsCounter = new AtomicInteger();
+    private static final AtomicInteger READYPROJECTSCOUNTER = new AtomicInteger();
 
-    private static final List<DeployRequest> deployRequests =
+    private static final List<DeployRequest> DEPLOYREQUESTS =
         Collections.synchronizedList( new ArrayList<DeployRequest>() );
 
     /**
@@ -74,7 +74,8 @@ public class DeployMojo
 
     /**
      * Whether every project should be deployed during its own deploy-phase or at the end of the multimodule build. If
-     * set to {@code true} and the build fails, none of the reactor projects is deployed. <strong>(experimental)</strong>
+     * set to {@code true} and the build fails, none of the reactor projects is deployed.
+     * <strong>(experimental)</strong>
      * 
      * @since 2.8
      */
@@ -136,8 +137,10 @@ public class DeployMojo
         {
             failIfOffline();
 
+            // CHECKSTYLE_OFF: LineLength
             DeployRequest currentExecutionDeployRequest =
                 new DeployRequest().setProject( project ).setUpdateReleaseInfo( isUpdateReleaseInfo() ).setRetryFailedDeploymentCount( getRetryFailedDeploymentCount() ).setAltReleaseDeploymentRepository( altReleaseDeploymentRepository ).setAltSnapshotDeploymentRepository( altSnapshotDeploymentRepository ).setAltDeploymentRepository( altDeploymentRepository );
+            // CHECKSTYLE_ON: LineLength
 
             if ( !deployAtEnd )
             {
@@ -145,19 +148,19 @@ public class DeployMojo
             }
             else
             {
-                deployRequests.add( currentExecutionDeployRequest );
+                DEPLOYREQUESTS.add( currentExecutionDeployRequest );
                 addedDeployRequest = true;
             }
         }
 
-        boolean projectsReady = readyProjectsCounter.incrementAndGet() == reactorProjects.size();
+        boolean projectsReady = READYPROJECTSCOUNTER.incrementAndGet() == reactorProjects.size();
         if ( projectsReady )
         {
-            synchronized ( deployRequests )
+            synchronized ( DEPLOYREQUESTS )
             {
-                while ( !deployRequests.isEmpty() )
+                while ( !DEPLOYREQUESTS.isEmpty() )
                 {
-                    deployProject( deployRequests.remove( 0 ) );
+                    deployProject( DEPLOYREQUESTS.remove( 0 ) );
                 }
             }
         }

Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployRequest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployRequest.java?rev=1640441&r1=1640440&r2=1640441&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployRequest.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployRequest.java Tue Nov 18 22:28:56 2014
@@ -1,7 +1,5 @@
 package org.apache.maven.plugin.deploy;
 
-import org.apache.maven.project.MavenProject;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -21,6 +19,8 @@ import org.apache.maven.project.MavenPro
  * under the License.
  */
 
+import org.apache.maven.project.MavenProject;
+
 /**
  * 
  * @author Robert Scholte