You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2013/11/16 14:33:57 UTC
svn commit: r1542511 - in
/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear:
AbstractEarMojo.java EarModule.java EarMojo.java JbossEarModule.java
output/AbstractFileNameMapping.java
Author: rfscholte
Date: Sat Nov 16 13:33:56 2013
New Revision: 1542511
URL: http://svn.apache.org/r1542511
Log:
Fix several checkstyle error
Modified:
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModule.java
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JbossEarModule.java
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/AbstractFileNameMapping.java
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java?rev=1542511&r1=1542510&r2=1542511&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java Sat Nov 16 13:33:56 2013
@@ -38,7 +38,7 @@ import org.codehaus.plexus.configuration
/**
* A base class for EAR-processing related tasks.
- *
+ *
* @author <a href="snicoll@apache.org">Stephane Nicoll</a>
* @version $Id$
*/
@@ -52,8 +52,7 @@ public abstract class AbstractEarMojo
public static final String UTF_8 = "UTF-8";
/**
- * The version of the application.xml to generate. Valid values
- * are 1.3, 1.4, 5, 6 and 7.
+ * The version of the application.xml to generate. Valid values are 1.3, 1.4, 5, 6 and 7.
*/
@Parameter( defaultValue = "1.3" )
protected String version;
@@ -101,18 +100,17 @@ public abstract class AbstractEarMojo
private Boolean includeLibInApplicationXml = Boolean.FALSE;
/**
- * The file name mapping to use for all dependencies included
- * in the EAR file.
+ * The file name mapping to use for all dependencies included in the EAR file.
*/
@Parameter
private String fileNameMapping;
-
+
/**
* When using a {@link #fileNameMapping} with versions, either use the {@code baseVersion} or the {@code version}.
- * When the artifact is a SNAPSHOT, {@code version} will always return a value with a {@code -SNAPSHOT} postfix
- * instead of the possible timestamped value.
- *
- * @since 2.9
+ * When the artifact is a SNAPSHOT, {@code version} will always return a value with a {@code -SNAPSHOT} postfix
+ * instead of the possible timestamped value.
+ *
+ * @since 2.9
*/
@Parameter
private Boolean useBaseVersion;
@@ -125,16 +123,16 @@ public abstract class AbstractEarMojo
/**
* The JBoss specific configuration.
- *
+ *
* @parameter
*/
@Parameter
private PlexusConfiguration jboss;
/**
- * The id to use to define the main artifact (e.g. the artifact without
- * a classifier) when there is multiple candidates.
- *
+ * The id to use to define the main artifact (e.g. the artifact without a classifier) when there is multiple
+ * candidates.
+ *
* @parameter
*/
@Parameter
@@ -181,7 +179,7 @@ public abstract class AbstractEarMojo
EarExecutionContext earExecutionContext =
new EarExecutionContext( project, mainArtifactId, defaultLibBundleDir, jbossConfiguration, fileNameMapping,
typeMappingService );
-
+
if ( useBaseVersion != null )
{
earExecutionContext.getFileNameMapping().setUseBaseVersion( useBaseVersion );
@@ -196,12 +194,13 @@ public abstract class AbstractEarMojo
// Let's validate user-defined modules
EarModule module;
- for (EarModule module1 : modules) {
+ for ( EarModule module1 : modules )
+ {
module = module1;
- getLog().debug("Resolving ear module[" + module + "]");
- module.setEarExecutionContext(earExecutionContext);
- module.resolveArtifact(project.getArtifacts());
- allModules.add(module);
+ getLog().debug( "Resolving ear module[" + module + "]" );
+ module.setEarExecutionContext( earExecutionContext );
+ module.resolveArtifact( project.getArtifacts() );
+ allModules.add( module );
}
}
@@ -222,8 +221,9 @@ public abstract class AbstractEarMojo
if ( !isArtifactRegistered( artifact, allModules ) && !artifact.isOptional()
&& filter.include( artifact ) )
{
- EarModule module = EarModuleFactory.newEarModule( artifact, javaEEVersion, defaultLibBundleDir,
- includeLibInApplicationXml, typeMappingService );
+ EarModule module =
+ EarModuleFactory.newEarModule( artifact, javaEEVersion, defaultLibBundleDir,
+ includeLibInApplicationXml, typeMappingService );
module.setEarExecutionContext( earExecutionContext );
allModules.add( module );
}
@@ -236,7 +236,7 @@ public abstract class AbstractEarMojo
// Now we have everything let's built modules which have not been excluded
earModules = new ArrayList<EarModule>();
- for ( EarModule earModule : allModules )
+ for ( EarModule earModule : allModules )
{
if ( earModule.isExcluded() )
{
@@ -276,7 +276,7 @@ public abstract class AbstractEarMojo
private static boolean isArtifactRegistered( Artifact a, List<EarModule> currentList )
{
- for( EarModule em : currentList )
+ for ( EarModule em : currentList )
{
if ( em.getArtifact().equals( a ) )
{
@@ -288,7 +288,7 @@ public abstract class AbstractEarMojo
/**
* Initializes the JBoss configuration.
- *
+ *
* @throws EarPluginException if the configuration is invalid
*/
private void initializeJbossConfiguration()
@@ -332,16 +332,17 @@ public abstract class AbstractEarMojo
final PlexusConfiguration[] dataSourcesConfig =
dataSourcesEl.getChildren( JbossConfiguration.DATASOURCE );
- for (PlexusConfiguration dataSourceConfig : dataSourcesConfig) {
- dataSources.add(dataSourceConfig.getValue());
+ for ( PlexusConfiguration dataSourceConfig : dataSourcesConfig )
+ {
+ dataSources.add( dataSourceConfig.getValue() );
}
}
final String libraryDirectory = jboss.getChild( JbossConfiguration.LIBRARY_DIRECTORY ).getValue();
- jbossConfiguration = new JbossConfiguration( version, securityDomain, unauthenticatedPrincipal, jmxName,
- loaderRepository, moduleOrder, dataSources,
- libraryDirectory, loaderRepositoryConfig,
- loaderRepositoryClass, configParserClass );
+ jbossConfiguration =
+ new JbossConfiguration( version, securityDomain, unauthenticatedPrincipal, jmxName,
+ loaderRepository, moduleOrder, dataSources, libraryDirectory,
+ loaderRepositoryConfig, loaderRepositoryClass, configParserClass );
}
catch ( PlexusConfigurationException e )
{
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModule.java?rev=1542511&r1=1542510&r2=1542511&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModule.java Sat Nov 16 13:33:56 2013
@@ -42,28 +42,28 @@ public interface EarModule
* @return the artifact
* @see #resolveArtifact(java.util.Set)
*/
- public Artifact getArtifact();
+ Artifact getArtifact();
/**
* Returns the <tt>URI</tt> for this module.
*
* @return the <tt>URI</tt>
*/
- public String getUri();
+ String getUri();
/**
* Returns the type associated to the module.
*
* @return the artifact's type of the module
*/
- public String getType();
+ String getType();
/**
* Specify whether this module should be excluded or not.
*
* @return true if this module should be skipped, false otherwise
*/
- public boolean isExcluded();
+ boolean isExcluded();
/**
* Specify whether this module should be unpacked in the EAR archive or not.
@@ -72,7 +72,7 @@ public interface EarModule
*
* @return true if this module should be bundled unpacked, false otherwise
*/
- public Boolean shouldUnpack();
+ Boolean shouldUnpack();
/**
* The alt-dd element specifies an optional URI to the post-assembly version of the deployment descriptor file for a
@@ -82,7 +82,7 @@ public interface EarModule
* @return the alternative deployment descriptor for this module
* @since JavaEE 5
*/
- public String getAltDeploymentDescriptor();
+ String getAltDeploymentDescriptor();
/**
* Appends the <tt>XML</tt> representation of this module.
@@ -91,7 +91,7 @@ public interface EarModule
* @param version the version of the <tt>application.xml</tt> file
* @param generateId whether an id should be generated
*/
- public void appendModule( XMLWriter writer, String version, Boolean generateId );
+ void appendModule( XMLWriter writer, String version, Boolean generateId );
/**
* Resolves the {@link Artifact} represented by the module. Note that the {@link EarExecutionContext} might be used
@@ -101,13 +101,13 @@ public interface EarModule
* @throws EarPluginException if the artifact could not be resolved
* @throws MojoFailureException if an unexpected error occurred
*/
- public void resolveArtifact( Set<Artifact> artifacts )
+ void resolveArtifact( Set<Artifact> artifacts )
throws EarPluginException, MojoFailureException;
- public void setEarExecutionContext( EarExecutionContext earExecutionContext );
+ void setEarExecutionContext( EarExecutionContext earExecutionContext );
- public boolean changeManifestClasspath();
+ boolean changeManifestClasspath();
- public String getLibDir();
+ String getLibDir();
}
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java?rev=1542511&r1=1542510&r2=1542511&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java Sat Nov 16 13:33:56 2013
@@ -580,7 +580,7 @@ public class EarMojo
* @param destDir Location where to put the unpacked files.
*/
public void unpack( File source, File destDir )
- throws NoSuchArchiverException, IOException, ArchiverException
+ throws NoSuchArchiverException, IOException
{
UnArchiver unArchiver = archiverManager.getUnArchiver( "zip" );
unArchiver.setSourceFile( source );
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JbossEarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JbossEarModule.java?rev=1542511&r1=1542510&r2=1542511&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JbossEarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JbossEarModule.java Sat Nov 16 13:33:56 2013
@@ -35,5 +35,5 @@ public interface JbossEarModule
* @param writer the writer to use
* @param version the version of the <tt>jboss-app.xml</tt> file
*/
- public void appendJbossModule( XMLWriter writer, String version );
+ void appendJbossModule( XMLWriter writer, String version );
}
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/AbstractFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/AbstractFileNameMapping.java?rev=1542511&r1=1542510&r2=1542511&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/AbstractFileNameMapping.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/AbstractFileNameMapping.java Sat Nov 16 13:33:56 2013
@@ -1,7 +1,5 @@
package org.apache.maven.plugin.ear.output;
-import org.apache.maven.artifact.Artifact;
-
/*
* 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.artifact.Artifac
* under the License.
*/
+import org.apache.maven.artifact.Artifact;
+
/**
* A base class used to generate the standard name of an artifact instead of relying on the (potentially) wrong file
* name provided by {@link org.apache.maven.artifact.Artifact#getFile()}.