Author: hboutemy
Date: Fri Nov 28 21:22:35 2014
New Revision: 1642363
URL: http://svn.apache.org/r1642363
Log:
updated parent pom and fixed errors reported by Checkstyle
Modified:
maven/plugins/trunk/maven-repository-plugin/pom.xml
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleCreateMojo.java
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleUtils.java
Modified: maven/plugins/trunk/maven-repository-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/pom.xml?rev=1642363&r1=1642362&r2=1642363&view=diff
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-repository-plugin/pom.xml Fri Nov 28 21:22:35 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>
@@ -58,7 +58,6 @@ under the License.
<properties>
<mavenVersion>2.2.1</mavenVersion>
- <mavenPluginVersion>3.2</mavenPluginVersion>
</properties>
<dependencyManagement>
@@ -111,7 +110,6 @@ under the License.
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
- <version>${mavenPluginVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -160,14 +158,6 @@ under the License.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>${mavenPluginVersion}</version>
- <configuration>
- <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
@@ -183,7 +173,7 @@ under the License.
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
- <excludes>
+ <excludes combine.children="append">
<exclude>src/it/bootstrap/**</exclude>
<exclude>src/it/bundle-pack/placeholder.txt</exclude>
<exclude>src/test/resources/repo/testgroup/testartifact/1.0/testartifact-1.0.pom</exclude>
@@ -193,32 +183,8 @@ under the License.
</plugin>
</plugins>
</pluginManagement>
-
- <plugins>
- <plugin>
- <artifactId>maven-plugin-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-descriptor</id>
- <goals>
- <goal>descriptor</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
</build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>${mavenPluginVersion}</version>
- </plugin>
- </plugins>
- </reporting>
-
<profiles>
<profile>
<id>run-its</id>
Modified:
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleCreateMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleCreateMojo.java?rev=1642363&r1=1642362&r2=1642363&view=diff
==============================================================================
---
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleCreateMojo.java
(original)
+++
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleCreateMojo.java
Fri Nov 28 21:22:35 2014
@@ -119,10 +119,11 @@ public class BundleCreateMojo
if ( disableMaterialization )
{
- getLog().warn( "Validations to confirm support for project
materialization have been DISABLED." +
- "\n\nYour project may not provide the POM elements necessary
to allow users to retrieve sources on-demand," +
- "\nor to easily checkout your project in an IDE. THIS CAN
SERIOUSLY INCONVENIENCE YOUR USERS." +
- "\n\nContinue? [y/N]" );
+ getLog().warn( "Validations to confirm support for project
materialization have been DISABLED."
+ + "\n\nYour project may not provide the POM elements
necessary to allow users to retrieve sources "
+ + "on-demand,"
+ + "\nor to easily checkout your project in an IDE. THIS CAN
SERIOUSLY INCONVENIENCE YOUR USERS."
+ + "\n\nContinue? [y/N]" );
try
{
Modified:
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java?rev=1642363&r1=1642362&r2=1642363&view=diff
==============================================================================
---
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
(original)
+++
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
Fri Nov 28 21:22:35 2014
@@ -221,10 +221,11 @@ public class BundlePackMojo
if ( disableMaterialization )
{
- getLog().warn( "Validations to confirm support for project
materialization have been DISABLED." +
- "\n\nYour project may not provide the POM elements
necessary to allow users to retrieve sources on-demand," +
- "\nor to easily checkout your project in an IDE. THIS
CAN SERIOUSLY INCONVENIENCE YOUR USERS." +
- "\n\nContinue? [y/N]" );
+ getLog().warn( "Validations to confirm support for project
materialization have been DISABLED."
+ + "\n\nYour project may not provide the POM elements
necessary to allow users to retrieve "
+ + "sources on-demand,"
+ + "\nor to easily checkout your project in an IDE. THIS
CAN SERIOUSLY INCONVENIENCE YOUR USERS."
+ + "\n\nContinue? [y/N]" );
try
{
Modified:
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleUtils.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleUtils.java?rev=1642363&r1=1642362&r2=1642363&view=diff
==============================================================================
---
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleUtils.java
(original)
+++
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundleUtils.java
Fri Nov 28 21:22:35 2014
@@ -33,14 +33,18 @@ import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;
+/**
+ *
+ */
final class BundleUtils
{
private BundleUtils()
{
}
- public static List<File> selectProjectFiles( final File dir, final
InputHandler inputHandler, final String finalName,
- final File pom, final Log log,
final boolean batchMode )
+ public static List<File> selectProjectFiles( final File dir, final
InputHandler inputHandler,
+ final String finalName, final
File pom, final Log log,
+ final boolean batchMode )
throws MojoExecutionException
{
File[] projectFiles = dir.listFiles( new FilenameFilter()
@@ -58,16 +62,23 @@ final class BundleUtils
return result;
}
- for (File projectFile : projectFiles) {
- if (projectFile.getName().endsWith(".pom")) {
- if (!projectFile.equals(pom)) {
- log.info("Detected POM file will be excluded:\n" +
projectFile
- + "\n\nInstead, the bundle will include the POM
from:\n" + pom);
+ for ( File projectFile : projectFiles )
+ {
+ if ( projectFile.getName().endsWith( ".pom" ) )
+ {
+ if ( !projectFile.equals( pom ) )
+ {
+ log.info( "Detected POM file will be excluded:\n" +
projectFile
+ + "\n\nInstead, the bundle will include the POM
from:\n" + pom );
}
- } else if (projectFile.getName().endsWith("-bundle.jar")) {
- log.warn("Skipping project file which collides with repository
bundle filename:\n" + projectFile);
- } else {
- result.add(projectFile);
+ }
+ else if ( projectFile.getName().endsWith( "-bundle.jar" ) )
+ {
+ log.warn( "Skipping project file which collides with
repository bundle filename:\n" + projectFile );
+ }
+ else
+ {
+ result.add( projectFile );
}
}
@@ -107,7 +118,7 @@ final class BundleUtils
return result;
}
- while( true )
+ while ( true )
{
StringBuilder message = new StringBuilder();
message.append( "The following files are marked for inclusion in
the repository bundle:\n" );
@@ -116,12 +127,12 @@ final class BundleUtils
int i = 1;
for ( File f : result )
{
- message.append( "\n" ).append( (i++) ).append( ".) " ).append(
f.getName() );
+ message.append( "\n" ).append( ( i++ ) ).append( ".) "
).append( f.getName() );
}
- message.append( "\n\nPlease select the number(s) for any files you
wish to exclude, " +
- "or '0' when you're done.\nSeparate the numbers for
multiple files with a " +
- "comma (',').\n\nSelection: " );
+ message.append( "\n\nPlease select the number(s) for any files you
wish to exclude, "
+ + "or '0' when you're done.\nSeparate the numbers for multiple
files with a "
+ + "comma (',').\n\nSelection: " );
log.info( message );
String response;
@@ -131,7 +142,8 @@ final class BundleUtils
}
catch ( IOException e )
{
- throw new MojoExecutionException( "Project file selection
failed with an I/O exception: " + e.getMessage(), e );
+ throw new MojoExecutionException( "Project file selection
failed with an I/O exception: "
+ + e.getMessage(), e );
}
if ( response == null || "0".equals( response ) )
@@ -151,7 +163,7 @@ final class BundleUtils
Arrays.sort( idxs );
- for( int k = idxs.length - 1; k > -1; k-- )
+ for ( int k = idxs.length - 1; k > -1; k-- )
{
if ( idxs[k] < 1 || idxs[k] > result.size() )
{
@@ -159,7 +171,7 @@ final class BundleUtils
continue;
}
- File removed = result.remove( idxs[k] -1 );
+ File removed = result.remove( idxs[k] - 1 );
log.info( "Removed: " + removed.getName() );
}
}