Author: khmarbaise
Date: Mon Nov 17 21:41:14 2014
New Revision: 1640232
URL: http://svn.apache.org/r1640232
Log:
[MINSTALL-111] Upgrade to maven-plugins parent version 27
Cleaned up pom cause parts are already defined in parent.
Modified:
maven/plugins/trunk/maven-install-plugin/pom.xml
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/DualDigester.java
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
Modified: maven/plugins/trunk/maven-install-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/pom.xml?rev=1640232&r1=1640231&r2=1640232&view=diff
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-install-plugin/pom.xml Mon Nov 17 21:41:14 2014
@@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
- <version>25</version>
+ <version>27</version>
<relativePath>../maven-plugins/pom.xml</relativePath>
</parent>
@@ -94,7 +94,6 @@ under the License.
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
- <version>${mavenPluginPluginVersion}</version>
<scope>provided</scope>
</dependency>
@@ -131,31 +130,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>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
<profiles>
<profile>
<id>run-its</id>
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java?rev=1640232&r1=1640231&r2=1640232&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
Mon Nov 17 21:41:14 2014
@@ -124,7 +124,9 @@ public abstract class AbstractInstallMoj
installChecksums( artifactFile );
}
+ // CHECKSTYLE_OFF: LineLength
protected void addMetaDataFilesForArtifact( Artifact artifact,
Collection<File> targetMetadataFiles, boolean createChecksum )
+ // CHECKSTYLE_ON: LineLength
{
if ( !createChecksum )
{
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/DualDigester.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/DualDigester.java?rev=1640232&r1=1640231&r2=1640232&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/DualDigester.java
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/DualDigester.java
Mon Nov 17 21:41:14 2014
@@ -45,9 +45,9 @@ public class DualDigester
private final MessageDigest sh1 = getDigester( "SHA-1" );
- private static final int bufsize = 65536 * 2;
+ private static final int BUFSIZE = 65536 * 2;
- private final byte[] buffer = new byte[bufsize];
+ private final byte[] buffer = new byte[BUFSIZE];
static MessageDigest getDigester( String algorithm )
{
@@ -104,12 +104,12 @@ public class DualDigester
private void update( InputStream is )
throws IOException
{
- int size = is.read( buffer, 0, bufsize );
+ int size = is.read( buffer, 0, BUFSIZE );
while ( size >= 0 )
{
md5.update( buffer, 0, size );
sh1.update( buffer, 0, size );
- size = is.read( buffer, 0, bufsize );
+ size = is.read( buffer, 0, BUFSIZE );
}
}
}
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java?rev=1640232&r1=1640231&r2=1640232&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
Mon Nov 17 21:41:14 2014
@@ -231,7 +231,9 @@ public class InstallFileMojo
if ( pomEntry.matcher( entry.getName() ).matches() )
{
+ // CHECKSTYLE_OFF: LineLength
getLog().debug( "Using " + entry.getName() + " for
groupId, artifactId, packaging and version" );
+ // CHECKSTYLE_ON: LineLength
foundPom = true;
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java?rev=1640232&r1=1640231&r2=1640232&view=diff
==============================================================================
---
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
(original)
+++
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
Mon Nov 17 21:41:14 2014
@@ -53,9 +53,9 @@ public class InstallMojo
* When building with multiple threads, reaching the last project doesn't
have to mean that all projects are ready
* to be installed
*/
- private static final AtomicInteger readyProjectsCounter = new
AtomicInteger();
+ private static final AtomicInteger READYPROJECTSCOUTNER = new
AtomicInteger();
- private static final List<InstallRequest> installRequests =
+ private static final List<InstallRequest> INSTALLREQUESTS =
Collections.synchronizedList( new ArrayList<InstallRequest>() );
/**
@@ -68,7 +68,8 @@ public class InstallMojo
/**
* Whether every project should be installed during its own install-phase
or at the end of the multimodule build. If
- * set to {@code true} and the build fails, none of the reactor projects
is installed. <strong>(experimental)</strong>
+ * set to {@code true} and the build fails, none of the reactor projects
is installed.
+ * <strong>(experimental)</strong>
*
* @since 2.5
*/
@@ -118,8 +119,10 @@ public class InstallMojo
}
else
{
+ // CHECKSTYLE_OFF: LineLength
InstallRequest currentExecutionInstallRequest =
new InstallRequest().setProject( project ).setCreateChecksum(
createChecksum ).setUpdateReleaseInfo( updateReleaseInfo );
+ // CHECKSTYLE_ON: LineLength
if ( !installAtEnd )
{
@@ -127,19 +130,19 @@ public class InstallMojo
}
else
{
- installRequests.add( currentExecutionInstallRequest );
+ INSTALLREQUESTS.add( currentExecutionInstallRequest );
addedInstallRequest = true;
}
}
- boolean projectsReady = readyProjectsCounter.incrementAndGet() ==
reactorProjects.size();
+ boolean projectsReady = READYPROJECTSCOUTNER.incrementAndGet() ==
reactorProjects.size();
if ( projectsReady )
{
- synchronized ( installRequests )
+ synchronized ( INSTALLREQUESTS )
{
- while ( !installRequests.isEmpty() )
+ while ( !INSTALLREQUESTS.isEmpty() )
{
- installProject( installRequests.remove( 0 ) );
+ installProject( INSTALLREQUESTS.remove( 0 ) );
}
}
}
@@ -217,8 +220,10 @@ public class InstallMojo
}
else
{
+ // CHECKSTYLE_OFF: LineLength
throw new MojoExecutionException(
"The packaging for this
project did not assign a file to the build artifact" );
+ // CHECKSTYLE_ON: LineLength
}
}