maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject svn commit: r1645331 - in /maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear: ./ output/ util/
Date Sat, 13 Dec 2014 17:31:10 GMT
Author: khmarbaise
Date: Sat Dec 13 17:31:09 2014
New Revision: 1645331

URL: http://svn.apache.org/r1645331
Log:
Improved code to reduce the checkstyle reported warnings/errors.

Modified:
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java
    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/AppClientModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.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/EarModuleFactory.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/EarPluginException.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/Ejb3Module.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbClientModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/HarModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JarModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ParModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/RarModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/SarModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/UnknownArtifactTypeException.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WsrModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/AbstractFileNameMapping.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionFileNameMapping.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionForEjbFileNameMapping.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactTypeMappingService.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/EarMavenArchiver.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/InvalidJavaEEVersion.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ModuleIdentifierValidator.java

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java Sat Dec 13 17:31:09 2014
@@ -37,10 +37,19 @@ public abstract class AbstractEarModule
     implements EarModule
 {
 
+    /**
+     * The module element.
+     */
     protected static final String MODULE_ELEMENT = "module";
 
+    /**
+     * The java module.
+     */
     protected static final String JAVA_MODULE = "java";
 
+    /**
+     * The alt-dd module.
+     */
     protected static final String ALT_DD = "alt-dd";
 
     private Artifact artifact;
@@ -53,22 +62,40 @@ public abstract class AbstractEarModule
 
     private String classifier;
 
+    /**
+     * The bundleDir.
+     */
     protected String bundleDir;
 
+    /**
+     * The bundleFileName.
+     */
     protected String bundleFileName;
 
+    /**
+     * excluded by default {@code false}.
+     */
     protected Boolean excluded = Boolean.FALSE;
 
     private String uri;
 
+    /**
+     * unpack
+     */
     protected Boolean unpack = null;
 
+    /**
+     * The alternate deployment descriptor.
+     */
     protected String altDeploymentDescriptor;
 
     private String moduleId;
 
     // This is injected once the module has been built.
 
+    /**
+     * The {@link EarExecutionContext}
+     */
     protected EarExecutionContext earExecutionContext;
 
     /**
@@ -92,6 +119,9 @@ public abstract class AbstractEarModule
         this.bundleDir = null;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void setEarExecutionContext( EarExecutionContext earExecutionContext )
     {
         this.earExecutionContext = earExecutionContext;
@@ -129,16 +159,25 @@ public abstract class AbstractEarModule
         }
     }
 
+    /**
+     * @return {@link #artifact}
+     */
     public Artifact getArtifact()
     {
         return artifact;
     }
 
+    /**
+     * @return {@link #moduleId}
+     */
     public String getModuleId()
     {
         return moduleId;
     }
 
+    /**
+     * @return Return the URI.
+     */
     public String getUri()
     {
         if ( uri == null )
@@ -158,7 +197,7 @@ public abstract class AbstractEarModule
     /**
      * Returns the artifact's groupId.
      * 
-     * @return the group Id
+     * @return {@link #groupId}
      */
     public String getGroupId()
     {
@@ -168,7 +207,7 @@ public abstract class AbstractEarModule
     /**
      * Returns the artifact's Id.
      * 
-     * @return the artifact Id
+     * @return {@link #artifactId}
      */
     public String getArtifactId()
     {
@@ -215,7 +254,8 @@ public abstract class AbstractEarModule
 
     /**
      * Based on MEAR-189 we need to get back
-     * the original file name under any circumstances. 
+     * the original file name under any circumstances.
+     * 
      * @return The original file name.
      */
     public String getOriginalBundleFileName()
@@ -245,6 +285,9 @@ public abstract class AbstractEarModule
         return excluded;
     }
 
+    /**
+     * @return {@link #unpack}
+     */
     public Boolean shouldUnpack()
     {
         return unpack;
@@ -284,17 +327,21 @@ public abstract class AbstractEarModule
         else if ( generateId )
         {
             // No module id was specified but one should be generated.
-            Artifact artifact = getArtifact();
+            Artifact theArtifact = getArtifact();
             String generatedId =
-                artifact.getType().toUpperCase() + "_" + artifact.getGroupId() + "." + artifact.getArtifactId();
-            if ( null != artifact.getClassifier() && artifact.getClassifier().trim().length() > 0 )
+                theArtifact.getType().toUpperCase() + "_" + theArtifact.getGroupId() + "."
+                    + theArtifact.getArtifactId();
+            if ( null != theArtifact.getClassifier() && theArtifact.getClassifier().trim().length() > 0 )
             {
-                generatedId += "-" + artifact.getClassifier().trim();
+                generatedId += "-" + theArtifact.getClassifier().trim();
             }
             writer.addAttribute( "id", generatedId );
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
@@ -371,11 +418,17 @@ public abstract class AbstractEarModule
 
     }
 
+    /**
+     * @return always {@code true}
+     */
     public boolean changeManifestClasspath()
     {
         return true;
     }
 
+    /**
+     * @return always {@code null}
+     */
     public String getLibDir()
     {
         return null;

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=1645331&r1=1645330&r2=1645331&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 Dec 13 17:31:09 2014
@@ -45,10 +45,19 @@ import org.codehaus.plexus.configuration
 public abstract class AbstractEarMojo
     extends AbstractMojo
 {
+    /**
+     * The application XML URI {@code META-INF/application.xml}
+     */
     public static final String APPLICATION_XML_URI = "META-INF/application.xml";
 
+    /**
+     * The {@code META-INF} folder.
+     */
     public static final String META_INF = "META-INF";
 
+    /**
+     * UTF-8 encoding constant.
+     */
     public static final String UTF_8 = "UTF-8";
 
     /**
@@ -105,8 +114,8 @@ public abstract class AbstractEarMojo
      * The {@code standard} means the filename is the artifactId incl. the version of the artifact.
      * The {@code no-version} means the files is only the artifactId without the version.
      * The {@code full} means the filename is the groupId+artifactId+version of the artifact.
-     * The {@code no-version-for-ejb} means the filename is the artifactId without the version in case of 
-     * {@code EJB} type.
+     * The {@code no-version-for-ejb} means the filename is the artifactId without the version in case of {@code EJB}
+     * type.
      */
     @Parameter
     private String fileNameMapping;
@@ -149,14 +158,14 @@ public abstract class AbstractEarMojo
      */
     @Parameter( defaultValue = "${project.build.directory}", required = true )
     private File tempFolder;
-    
+
     private List<EarModule> earModules;
 
     private List<EarModule> allModules;
 
     private JbossConfiguration jbossConfiguration;
 
-    @SuppressWarnings( "unchecked" )
+    /** {@inheritDoc} */
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
@@ -262,6 +271,9 @@ public abstract class AbstractEarMojo
 
     }
 
+    /**
+     * @return The list of {@link #earModules}.
+     */
     protected List<EarModule> getModules()
     {
         if ( earModules == null )
@@ -271,21 +283,33 @@ public abstract class AbstractEarMojo
         return earModules;
     }
 
+    /**
+     * @return {@link MavenProject}
+     */
     protected MavenProject getProject()
     {
         return project;
     }
 
+    /**
+     * @return {@link #workDirectory}
+     */
     protected File getWorkDirectory()
     {
         return workDirectory;
     }
 
+    /**
+     * @return {@link #jbossConfiguration}
+     */
     protected JbossConfiguration getJbossConfiguration()
     {
         return jbossConfiguration;
     }
 
+    /**
+     * @return {@link #tempFolder}
+     */
     public File getTempFolder()
     {
         return tempFolder;
@@ -319,11 +343,11 @@ public abstract class AbstractEarMojo
         {
             try
             {
-                String version = jboss.getChild( JbossConfiguration.VERSION ).getValue();
-                if ( version == null )
+                String childVersion = jboss.getChild( JbossConfiguration.VERSION ).getValue();
+                if ( childVersion == null )
                 {
                     getLog().info( "JBoss version not set, using JBoss 4 by default" );
-                    version = JbossConfiguration.VERSION_4;
+                    childVersion = JbossConfiguration.VERSION_4;
                 }
                 final String securityDomain = jboss.getChild( JbossConfiguration.SECURITY_DOMAIN ).getValue();
                 final String unauthenticatedPrincipal =
@@ -357,7 +381,7 @@ public abstract class AbstractEarMojo
                 }
                 final String libraryDirectory = jboss.getChild( JbossConfiguration.LIBRARY_DIRECTORY ).getValue();
                 jbossConfiguration =
-                    new JbossConfiguration( version, securityDomain, unauthenticatedPrincipal, jmxName,
+                    new JbossConfiguration( childVersion, securityDomain, unauthenticatedPrincipal, jmxName,
                                             loaderRepository, moduleOrder, dataSources, libraryDirectory,
                                             loaderRepositoryConfig, loaderRepositoryClass, configParserClass );
             }

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AppClientModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AppClientModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AppClientModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AppClientModule.java Sat Dec 13 17:31:09 2014
@@ -31,15 +31,24 @@ public class AppClientModule
     extends AbstractEarModule
 {
 
+    /**
+     * Create an instance.
+     */
     public AppClientModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public AppClientModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         startModuleElement( writer, generateId );
@@ -52,6 +61,9 @@ public class AppClientModule
         writer.endElement();
     }
 
+    /**
+     * @return The type of the module.
+     */
     public String getType()
     {
         return "app-client";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java Sat Dec 13 17:31:09 2014
@@ -41,6 +41,14 @@ public class EarExecutionContext
 
     private ArtifactRepository artifactRepository;
 
+    /**
+     * @param project {@link MavenProject}
+     * @param mainArtifactId The artifactId.
+     * @param defaultLibBundleDir The defaultLibBundleDir.
+     * @param jbossConfiguration {@link JbossConfiguration}
+     * @param fileNameMappingName file name mapping.
+     * @param typeMappingService {@link ArtifactTypeMappingService}
+     */
     public EarExecutionContext( MavenProject project, String mainArtifactId, String defaultLibBundleDir,
                                 JbossConfiguration jbossConfiguration, String fileNameMappingName,
                                 ArtifactTypeMappingService typeMappingService )
@@ -50,21 +58,33 @@ public class EarExecutionContext
 
     }
 
+    /**
+     * @return {@link #defaultLibBundleDir}
+     */
     public String getDefaultLibBundleDir()
     {
         return defaultLibBundleDir;
     }
 
+    /**
+     * @return {@link #jbossConfiguration}
+     */
     public boolean isJbossConfigured()
     {
         return jbossConfiguration != null;
     }
 
+    /**
+     * @return {@link #fileNameMapping}
+     */
     public FileNameMapping getFileNameMapping()
     {
         return fileNameMapping;
     }
 
+    /**
+     * @return {@link #artifactRepository}
+     */
     public ArtifactRepository getArtifactRepository()
     {
         return artifactRepository;

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=1645331&r1=1645330&r2=1645331&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 Dec 13 17:31:09 2014
@@ -104,10 +104,19 @@ public interface EarModule
     void resolveArtifact( Set<Artifact> artifacts )
         throws EarPluginException, MojoFailureException;
 
+    /**
+     * @param earExecutionContext The execution context.
+     */
     void setEarExecutionContext( EarExecutionContext earExecutionContext );
 
+    /**
+     * @return the state if manifest classpath will be changed or not.
+     */
     boolean changeManifestClasspath();
 
+    /**
+     * @return The libDir.
+     */
     String getLibDir();
 
 }

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModuleFactory.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModuleFactory.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModuleFactory.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarModuleFactory.java Sat Dec 13 17:31:09 2014
@@ -35,6 +35,9 @@ import java.util.List;
  */
 public final class EarModuleFactory
 {
+    /**
+     * The list of artifact types.
+     */
     public static final List<String> STANDARD_ARTIFACT_TYPE;
 
     static

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=1645331&r1=1645330&r2=1645331&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 Dec 13 17:31:09 2014
@@ -311,6 +311,7 @@ public class EarMojo
 
     }
 
+    /** {@inheritDoc} */
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
@@ -373,9 +374,9 @@ public class EarMojo
         {
             File earFile = getEarFile( outputDirectory, finalName, classifier );
             final MavenArchiver archiver = new EarMavenArchiver( getModules() );
-            final JarArchiver jarArchiver = getJarArchiver();
-            getLog().debug( "Jar archiver implementation [" + jarArchiver.getClass().getName() + "]" );
-            archiver.setArchiver( jarArchiver );
+            final JarArchiver theJarArchiver = getJarArchiver();
+            getLog().debug( "Jar archiver implementation [" + theJarArchiver.getClass().getName() + "]" );
+            archiver.setArchiver( theJarArchiver );
             archiver.setOutputFile( earFile );
 
             // Include custom manifest if necessary
@@ -510,11 +511,17 @@ public class EarMojo
         return unpackTypesList;
     }
 
+    /**
+     * @return {@link #applicationXml}
+     */
     public String getApplicationXml()
     {
         return applicationXml;
     }
 
+    /**
+     * @param applicationXml {@link #applicationXml}
+     */
     public void setApplicationXml( String applicationXml )
     {
         this.applicationXml = applicationXml;
@@ -552,6 +559,9 @@ public class EarMojo
         return StringUtils.split( StringUtils.defaultString( earSourceIncludes ), "," );
     }
 
+    /**
+     * @return The array with the packaging excludes.
+     */
     public String[] getPackagingExcludes()
     {
         if ( StringUtils.isEmpty( packagingExcludes ) )
@@ -564,11 +574,17 @@ public class EarMojo
         }
     }
 
+    /**
+     * @param packagingExcludes {@link #packagingExcludes}
+     */
     public void setPackagingExcludes( String packagingExcludes )
     {
         this.packagingExcludes = packagingExcludes;
     }
 
+    /**
+     * @return The arrays with the includes.
+     */
     public String[] getPackagingIncludes()
     {
         if ( StringUtils.isEmpty( packagingIncludes ) )
@@ -581,6 +597,9 @@ public class EarMojo
         }
     }
 
+    /**
+     * @param packagingIncludes {@link #packagingIncludes}
+     */
     public void setPackagingIncludes( String packagingIncludes )
     {
         this.packagingIncludes = packagingIncludes;
@@ -656,6 +675,8 @@ public class EarMojo
      * 
      * @param source File to be unpacked.
      * @param destDir Location where to put the unpacked files.
+     * @throws NoSuchArchiverException In case of we don't have an appropriate archiver.
+     * @throws IOException In case of a general IOException.
      */
     public void unpack( File source, File destDir )
         throws NoSuchArchiverException, IOException
@@ -699,6 +720,10 @@ public class EarMojo
         }
     }
 
+    /**
+     * @param fileName The name of the file which should be checked.
+     * @return {@code true} if the name is part of the non filtered extensions {@code false} otherwise.
+     */
     public boolean isNonFilteredExtension( String fileName )
     {
         return !mavenResourcesFiltering.filteredFileExtension( fileName, nonFilteredFileExtensions );
@@ -763,8 +788,8 @@ public class EarMojo
                 getLog().debug( "This project did not have a META-INF directory before, so a new directory was created." );
                 // CHECKSTYLE_ON: LineLength
             }
-            File manifestFile = new File( metaInfDirectory, "MANIFEST.MF" );
-            boolean newManifestCreated = manifestFile.createNewFile();
+            File newCreatedManifestFile = new File( metaInfDirectory, "MANIFEST.MF" );
+            boolean newManifestCreated = newCreatedManifestFile.createNewFile();
             if ( newManifestCreated )
             {
                 // CHECKSTYLE_OFF: LineLength
@@ -773,7 +798,7 @@ public class EarMojo
             }
 
             // Read the manifest from disk
-            Manifest mf = new Manifest( new FileReader( manifestFile ) );
+            Manifest mf = new Manifest( new FileReader( newCreatedManifestFile ) );
             Attribute classPath = mf.getMainSection().getAttribute( "Class-Path" );
             List<String> classPathElements = new ArrayList<String>();
 
@@ -836,7 +861,7 @@ public class EarMojo
             mf.getMainSection().addConfiguredAttribute( classPath );
 
             // Write the manifest to disk
-            PrintWriter pw = new PrintWriter( manifestFile );
+            PrintWriter pw = new PrintWriter( newCreatedManifestFile );
             mf.write( pw );
             pw.close();
 

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarPluginException.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarPluginException.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarPluginException.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarPluginException.java Sat Dec 13 17:31:09 2014
@@ -34,20 +34,33 @@ public class EarPluginException
      */
     private static final long serialVersionUID = -5540929953103327928L;
 
+    /**
+     * Create an instance.
+     */
     public EarPluginException()
     {
     }
 
+    /**
+     * @param message The message for the exception.
+     */
     public EarPluginException( String message )
     {
         super( message );
     }
 
+    /**
+     * @param cause {@link Throwable}
+     */
     public EarPluginException( Throwable cause )
     {
         super( cause );
     }
 
+    /**
+     * @param message The message to emit.
+     * @param cause {@link Throwable}
+     */
     public EarPluginException( String message, Throwable cause )
     {
         super( message, cause );

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/Ejb3Module.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/Ejb3Module.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/Ejb3Module.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/Ejb3Module.java Sat Dec 13 17:31:09 2014
@@ -32,16 +32,27 @@ import org.apache.maven.artifact.Artifac
 public class Ejb3Module
     extends EjbModule
 {
+    /**
+     * Create an instance.
+     */
     public Ejb3Module()
     {
         super();
     }
 
+    /**
+     * Create an instance with artifact.
+     * 
+     * @param a {@link Artifact}
+     */
     public Ejb3Module( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "ejb3";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbClientModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbClientModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbClientModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbClientModule.java Sat Dec 13 17:31:09 2014
@@ -31,16 +31,26 @@ public class EjbClientModule
     extends JarModule
 {
 
+    /**
+     * Create an instance.
+     */
     public EjbClientModule()
     {
         super();
     }
 
+    /**
+     * @param a {@link Artifact}
+     * @param defaultLibBundleDir The default lib bundle directory.
+     */
     public EjbClientModule( Artifact a, String defaultLibBundleDir )
     {
         super( a, defaultLibBundleDir, Boolean.FALSE );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "ejb-client";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EjbModule.java Sat Dec 13 17:31:09 2014
@@ -31,17 +31,26 @@ import org.codehaus.plexus.util.xml.XMLW
 public class EjbModule
     extends AbstractEarModule
 {
-    protected static final String EJB_MODULE = "ejb";
+    private static final String EJB_MODULE = "ejb";
 
+    /**
+     * Create an instance.
+     */
     public EjbModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public EjbModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         startModuleElement( writer, generateId );
@@ -54,8 +63,11 @@ public class EjbModule
         writer.endElement();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
-        return "ejb";
+        return EJB_MODULE;
     }
 }

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java Sat Dec 13 17:31:09 2014
@@ -42,17 +42,26 @@ import java.util.List;
  * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
  * @version $Id$
  */
-@Mojo(
-    name = "generate-application-xml", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, 
-    threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )
+// CHECKSTYLE_OFF: LineLength
+@Mojo( name = "generate-application-xml", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )
+//CHECKSTYLE_ON: LineLength
 public class GenerateApplicationXmlMojo
     extends AbstractEarMojo
 {
 
+    /**
+     * The DEFAULT library folder.
+     */
     public static final String DEFAULT = "DEFAULT";
 
+    /**
+     * The empty folder.
+     */
     public static final String EMPTY = "EMPTY";
 
+    /**
+     * The NONE not existent folder.
+     */
     public static final String NONE = "NONE";
 
     /**
@@ -132,6 +141,9 @@ public class GenerateApplicationXmlMojo
     @Parameter( alias = "env-entries" )
     private PlexusConfiguration envEntries;
 
+    /**
+     * {@inheritDoc}
+     */
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
@@ -201,6 +213,9 @@ public class GenerateApplicationXmlMojo
 
     /**
      * Generates the deployment descriptor.
+     * 
+     * @param javaEEVersion {@link JavaEEVersion}
+     * @throws EarPluginException if the configuration is invalid
      */
     protected void generateStandardDeploymentDescriptor( JavaEEVersion javaEEVersion )
         throws EarPluginException
@@ -223,6 +238,8 @@ public class GenerateApplicationXmlMojo
 
     /**
      * Generates the jboss deployment descriptor.
+     * 
+     * @throws EarPluginException if the configuration is invalid
      */
     protected void generateJbossDeploymentDescriptor()
         throws EarPluginException
@@ -260,20 +277,21 @@ public class GenerateApplicationXmlMojo
             for ( PlexusConfiguration securityRole : securityRoles )
             {
                 final String id = securityRole.getAttribute( SecurityRole.ID_ATTRIBUTE );
-                final String roleName = securityRole.getChild( SecurityRole.ROLE_NAME ).getValue();
-                final String roleNameId =
+                final String childRoleName = securityRole.getChild( SecurityRole.ROLE_NAME ).getValue();
+                final String childRoleNameId =
                     securityRole.getChild( SecurityRole.ROLE_NAME ).getAttribute( SecurityRole.ID_ATTRIBUTE );
-                final String description = securityRole.getChild( SecurityRole.DESCRIPTION ).getValue();
-                final String descriptionId =
+                final String childDescription = securityRole.getChild( SecurityRole.DESCRIPTION ).getValue();
+                final String childDescriptionId =
                     securityRole.getChild( SecurityRole.DESCRIPTION ).getAttribute( SecurityRole.ID_ATTRIBUTE );
 
-                if ( roleName == null )
+                if ( childRoleName == null )
                 {
                     throw new EarPluginException( "Invalid security-role configuration, role-name could not be null." );
                 }
                 else
                 {
-                    result.add( new SecurityRole( roleName, roleNameId, id, description, descriptionId ) );
+                    result.add( new SecurityRole( childRoleName, childRoleNameId, id, childDescription,
+                                                  childDescriptionId ) );
                 }
             }
             return result;
@@ -305,14 +323,15 @@ public class GenerateApplicationXmlMojo
 
             for ( PlexusConfiguration envEntry : allEnvEntries )
             {
-                final String description = envEntry.getChild( EnvEntry.DESCRIPTION ).getValue();
-                final String envEntryName = envEntry.getChild( EnvEntry.ENV_ENTRY_NAME ).getValue();
-                final String envEntryType = envEntry.getChild( EnvEntry.ENV_ENTRY_TYPE ).getValue();
-                final String envEntryValue = envEntry.getChild( EnvEntry.ENV_ENTRY_VALUE ).getValue();
+                final String childDescription = envEntry.getChild( EnvEntry.DESCRIPTION ).getValue();
+                final String childEnvEntryName = envEntry.getChild( EnvEntry.ENV_ENTRY_NAME ).getValue();
+                final String childEnvEntryType = envEntry.getChild( EnvEntry.ENV_ENTRY_TYPE ).getValue();
+                final String childEnvEntryValue = envEntry.getChild( EnvEntry.ENV_ENTRY_VALUE ).getValue();
 
                 try
                 {
-                    result.add( new EnvEntry( description, envEntryName, envEntryType, envEntryValue ) );
+                    result.add( new EnvEntry( childDescription, childEnvEntryName, childEnvEntryType,
+                                              childEnvEntryValue ) );
                 }
                 catch ( IllegalArgumentException e )
                 {

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/HarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/HarModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/HarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/HarModule.java Sat Dec 13 17:31:09 2014
@@ -32,15 +32,24 @@ public class HarModule
     extends AbstractEarModule
     implements JbossEarModule
 {
+    /**
+     * Create an instance.
+     */
     public HarModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public HarModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         // No entry is generated by this artifact ; it should be
@@ -48,6 +57,9 @@ public class HarModule
         // See http://docs.jboss.org/jbossas/getting_started/v4/html/hibernate.html
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendJbossModule( XMLWriter writer, String version )
     {
         writer.startElement( MODULE_ELEMENT );
@@ -57,6 +69,9 @@ public class HarModule
         writer.endElement();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "har";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JarModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JarModule.java Sat Dec 13 17:31:09 2014
@@ -37,16 +37,27 @@ import java.util.Set;
  * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
  * @version $Id$
  */
+/**
+ * @author kama
+ */
 public class JarModule
     extends AbstractEarModule
 {
     private Boolean includeInApplicationXml = Boolean.FALSE;
 
+    /**
+     * Create an instance.
+     */
     public JarModule()
     {
         super();
     }
 
+    /**
+     * @param a {@link Artifact}
+     * @param defaultLibBundleDir The default library bundle directory.
+     * @param includeInApplicationXml Include the application xml or not.
+     */
     public JarModule( Artifact a, String defaultLibBundleDir, Boolean includeInApplicationXml )
     {
         super( a );
@@ -55,6 +66,9 @@ public class JarModule
 
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         // Generates an entry in the application.xml only if
@@ -72,6 +86,9 @@ public class JarModule
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void resolveArtifact( Set<Artifact> artifacts )
         throws EarPluginException, MojoFailureException
     {
@@ -83,6 +100,9 @@ public class JarModule
         setLibBundleDir( earExecutionContext.getDefaultLibBundleDir() );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "jar";
@@ -96,6 +116,9 @@ public class JarModule
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean changeManifestClasspath()
     {
         return false;

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java Sat Dec 13 17:31:09 2014
@@ -34,7 +34,7 @@ public class JavaModule
 {
 
     /**
-     * @deprecated use {@link org.apache.maven.plugin.ear.JavaModule#JarModule()} instead
+     * @deprecated use {@link #JarModule} instead
      */
     public JavaModule()
     {
@@ -42,6 +42,9 @@ public class JavaModule
     }
 
     /**
+     * @param a {@link Artifact}
+     * @param defaultLibBundleDir The default library bundle directory.
+     * @param includeInApplicationXml Include the application xml or not.
      * @deprecated use {@link JarModule} instead
      */
     public JavaModule( Artifact a, String defaultLibBundleDir, Boolean includeInApplicationXml )

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ParModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ParModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ParModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ParModule.java Sat Dec 13 17:31:09 2014
@@ -32,16 +32,25 @@ public class ParModule
     extends EjbModule
 {
 
+    /**
+     * Create an instance.
+     */
     public ParModule()
     {
         super();
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public ParModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "par";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/RarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/RarModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/RarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/RarModule.java Sat Dec 13 17:31:09 2014
@@ -31,17 +31,26 @@ import org.codehaus.plexus.util.xml.XMLW
 public class RarModule
     extends AbstractEarModule
 {
-    protected static final String RAR_MODULE = "connector";
+    private static final String RAR_MODULE = "connector";
 
+    /**
+     * Create an instance.
+     */
     public RarModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public RarModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         startModuleElement( writer, generateId );
@@ -54,8 +63,11 @@ public class RarModule
         writer.endElement();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
-        return "rar";
+        return RAR_MODULE;
     }
 }

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/SarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/SarModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/SarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/SarModule.java Sat Dec 13 17:31:09 2014
@@ -29,21 +29,34 @@ import org.codehaus.plexus.util.xml.XMLW
  * @author $Author$ (last edit)
  * @version $Revision$
  */
+/**
+ * @author kama
+ *
+ */
 public class SarModule
     extends AbstractEarModule
     implements JbossEarModule
 {
-    protected static final String SAR_MODULE = "connector";
+    private static final String SAR_MODULE = "connector";
 
+    /**
+     * Create an instance.
+     */
     public SarModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public SarModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         // If JBoss is not configured, add the module as a connector element
@@ -57,6 +70,9 @@ public class SarModule
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendJbossModule( XMLWriter writer, String version )
     {
         writer.startElement( MODULE_ELEMENT );
@@ -66,6 +82,9 @@ public class SarModule
         writer.endElement();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "sar";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/UnknownArtifactTypeException.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/UnknownArtifactTypeException.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/UnknownArtifactTypeException.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/UnknownArtifactTypeException.java Sat Dec 13 17:31:09 2014
@@ -34,10 +34,16 @@ public class UnknownArtifactTypeExceptio
      */
     private static final long serialVersionUID = 2738931967722457793L;
 
+    /**
+     * Create an instance.
+     */
     public UnknownArtifactTypeException()
     {
     }
 
+    /**
+     * @param message The message of the problem.
+     */
     public UnknownArtifactTypeException( String message )
     {
         super( message );

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java Sat Dec 13 17:31:09 2014
@@ -34,24 +34,33 @@ import java.util.Set;
 public class WebModule
     extends AbstractEarModule
 {
-    protected static final String WEB_MODULE = "web";
+    private static final String WEB_MODULE = "web";
 
-    protected static final String WEB_URI_FIELD = "web-uri";
+    private static final String WEB_URI_FIELD = "web-uri";
 
-    protected static final String CONTEXT_ROOT_FIELD = "context-root";
+    private static final String CONTEXT_ROOT_FIELD = "context-root";
 
     private String contextRoot;
 
+    /**
+     * Create an instance.
+     */
     public WebModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public WebModule( Artifact a )
     {
         super( a );
         this.contextRoot = getDefaultContextRoot( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void appendModule( XMLWriter writer, String version, Boolean generateId )
     {
         startModuleElement( writer, generateId );
@@ -71,6 +80,9 @@ public class WebModule
         writer.endElement(); // module
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void resolveArtifact( Set<Artifact> artifacts )
         throws EarPluginException, MojoFailureException
     {
@@ -96,6 +108,9 @@ public class WebModule
         return contextRoot;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "war";
@@ -116,6 +131,9 @@ public class WebModule
         return "/" + a.getArtifactId();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getLibDir()
     {
         return "WEB-INF/lib";

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WsrModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WsrModule.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WsrModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WsrModule.java Sat Dec 13 17:31:09 2014
@@ -31,15 +31,24 @@ import org.apache.maven.artifact.Artifac
 public class WsrModule
     extends RarModule
 {
+    /**
+     * Create an instance.
+     */
     public WsrModule()
     {
     }
 
+    /**
+     * @param a {@link Artifact}
+     */
     public WsrModule( Artifact a )
     {
         super( a );
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getType()
     {
         return "wsr";

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=1645331&r1=1645330&r2=1645331&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 Dec 13 17:31:09 2014
@@ -33,6 +33,7 @@ public abstract class AbstractFileNameMa
 
     private boolean useBaseVersion = false;
 
+    /** {@inheritDoc} */
     public final void setUseBaseVersion( boolean useBaseVersion )
     {
         this.useBaseVersion = useBaseVersion;

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java Sat Dec 13 17:31:09 2014
@@ -33,7 +33,7 @@ public interface FileNameMapping
 {
 
     /**
-     * @param useBaseVersion
+     * @param useBaseVersion true if the base version will be use false otherwise.
      */
     void setUseBaseVersion( boolean useBaseVersion );
 

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java Sat Dec 13 17:31:09 2014
@@ -45,6 +45,9 @@ public class FileNameMappingFactory
     {
     }
 
+    /**
+     * @return {@link StandardFileNameMapping}
+     */
     public static FileNameMapping getDefaultFileNameMapping()
     {
         return new StandardFileNameMapping();
@@ -55,10 +58,8 @@ public class FileNameMappingFactory
      * 
      * @param nameOrClass a name of the fqn of the implementation
      * @return the file name mapping implementation
-     * @throws IllegalStateException if the implementation is not found
      */
     public static FileNameMapping getFileNameMapping( final String nameOrClass )
-        throws IllegalStateException
     {
         if ( STANDARD_FILE_NAME_MAPPING.equals( nameOrClass ) )
         {

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java Sat Dec 13 17:31:09 2014
@@ -31,6 +31,9 @@ public class FullFileNameMapping
     extends AbstractFileNameMapping
 {
 
+    /**
+     * {@inheritDoc}
+     */
     public String mapFileName( final Artifact a )
     {
         final String dashedGroupId = a.getGroupId().replace( '.', '-' );

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionFileNameMapping.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionFileNameMapping.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionFileNameMapping.java Sat Dec 13 17:31:09 2014
@@ -30,6 +30,9 @@ public class NoVersionFileNameMapping
     extends AbstractFileNameMapping
 {
 
+    /**
+     * {@inheritDoc}
+     */
     public String mapFileName( Artifact a )
     {
         return generateFileName( a, false );

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionForEjbFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionForEjbFileNameMapping.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionForEjbFileNameMapping.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/NoVersionForEjbFileNameMapping.java Sat Dec 13 17:31:09 2014
@@ -31,6 +31,9 @@ public class NoVersionForEjbFileNameMapp
     extends AbstractFileNameMapping
 {
 
+    /**
+     * {@inheritDoc}
+     */
     public String mapFileName( Artifact a )
     {
         boolean isEjb = "ejb".equals( a.getType() );

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java Sat Dec 13 17:31:09 2014
@@ -31,6 +31,9 @@ public class StandardFileNameMapping
     extends AbstractFileNameMapping
 {
 
+    /**
+     * {@inheritDoc}
+     */
     public String mapFileName( final Artifact a )
     {
         return generateFileName( a, true );

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java Sat Dec 13 17:31:09 2014
@@ -43,7 +43,7 @@ public class ArtifactRepository
      * 
      * @param artifacts the artifacts
      * @param mainArtifactId the id to use for the main artifact (no classifier)
-     * @param artifactTypeMappingService
+     * @param artifactTypeMappingService {@link ArtifactTypeMappingService}
      */
     public ArtifactRepository( Set<Artifact> artifacts, String mainArtifactId,
                                ArtifactTypeMappingService artifactTypeMappingService )

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactTypeMappingService.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactTypeMappingService.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactTypeMappingService.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactTypeMappingService.java Sat Dec 13 17:31:09 2014
@@ -50,6 +50,9 @@ public class ArtifactTypeMappingService
     // The user-defined mapping for direct access
     private final Map<String, String> customMappings;
 
+    /**
+     * Create an instance.
+     */
     public ArtifactTypeMappingService()
     {
         this.typeMappings = new HashMap<String, List<String>>();
@@ -57,6 +60,11 @@ public class ArtifactTypeMappingService
         init();
     }
 
+    /**
+     * @param plexusConfiguration {@link PlexusConfiguration}
+     * @throws EarPluginException {@link EarPluginException}
+     * @throws PlexusConfigurationException {@link PlexusConfigurationException}
+     */
     public void configure( final PlexusConfiguration plexusConfiguration )
         throws EarPluginException, PlexusConfigurationException
     {
@@ -119,8 +127,7 @@ public class ArtifactTypeMappingService
             throw new IllegalStateException( "Artifact type[" + standardType + "] is not a standard Ear artifact type["
                 + EarModuleFactory.getStandardArtifactTypes() + "]" );
         }
-        final List<String> typeMappings = this.typeMappings.get( standardType );
-        return typeMappings.contains( customType );
+        return this.typeMappings.get( standardType ).contains( customType );
 
     }
 
@@ -130,6 +137,7 @@ public class ArtifactTypeMappingService
      * 
      * @param type a type
      * @return the standard type (ejb, jar, war, ...) for this type
+     * @throws UnknownArtifactTypeException In case of missing mappings types.
      */
     public String getStandardType( final String type )
         throws UnknownArtifactTypeException

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/EarMavenArchiver.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/EarMavenArchiver.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/EarMavenArchiver.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/EarMavenArchiver.java Sat Dec 13 17:31:09 2014
@@ -40,6 +40,9 @@ import org.codehaus.plexus.archiver.jar.
 public class EarMavenArchiver
     extends MavenArchiver
 {
+    /**
+     * {@code Class-Path}.
+     */
     public static final String CLASS_PATH_KEY = "Class-Path";
 
     private final List<EarModule> earModules;
@@ -54,13 +57,21 @@ public class EarMavenArchiver
         this.earModules = earModules;
     }
 
-    /** @deprecated */
+    /**
+     * @param project {@link MavenProject}
+     * @param config {@link MavenArchiveConfiguration}
+     * @throws ManifestException in case of an error
+     * @throws DependencyResolutionRequiredException in case of an resolution error.
+     * @return Manifest
+     * @deprecated
+     */
     public Manifest getManifest( MavenProject project, MavenArchiveConfiguration config )
         throws ManifestException, DependencyResolutionRequiredException
     {
         return this.getManifest( null, project, config );
     }
 
+    /** {@inheritDoc} */
     public Manifest getManifest( MavenSession session, MavenProject project, MavenArchiveConfiguration config )
         throws ManifestException, DependencyResolutionRequiredException
     {
@@ -110,6 +121,10 @@ public class EarMavenArchiver
         return classpath.toString().trim();
     }
 
+    /**
+     * @param config {@link MavenArchiveConfiguration}
+     * @return The class path entry.
+     */
     protected String getUserSuppliedClassPathEntry( MavenArchiveConfiguration config )
     {
         if ( config.getManifestEntries() != null )

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/InvalidJavaEEVersion.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/InvalidJavaEEVersion.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/InvalidJavaEEVersion.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/InvalidJavaEEVersion.java Sat Dec 13 17:31:09 2014
@@ -35,12 +35,19 @@ public class InvalidJavaEEVersion
 
     private final String invalidVersion;
 
+    /**
+     * @param message The message for the error
+     * @param invalidVersion The invalid version.
+     */
     public InvalidJavaEEVersion( String message, String invalidVersion )
     {
         super( message );
         this.invalidVersion = invalidVersion;
     }
 
+    /**
+     * @return The invalid version.
+     */
     public String getInvalidVersion()
     {
         return invalidVersion;

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java Sat Dec 13 17:31:09 2014
@@ -79,14 +79,19 @@ public class JavaEEVersion
         VERSION_MAP.put( version, this );
     }
 
-    public static JavaEEVersion getJavaEEVersion( String version )
+    /**
+     * @param paramVersion The version.
+     * @return {@link JavaEEVersion}
+     * @throws InvalidJavaEEVersion in case of a wrong version.
+     */
+    public static JavaEEVersion getJavaEEVersion( String paramVersion )
         throws InvalidJavaEEVersion
     {
-        if ( !isValid( version ) )
+        if ( !isValid( paramVersion ) )
         {
-            throw new InvalidJavaEEVersion( "Invalid version [" + version + "]", version );
+            throw new InvalidJavaEEVersion( "Invalid version [" + paramVersion + "]", paramVersion );
         }
-        return VERSION_MAP.get( version );
+        return VERSION_MAP.get( paramVersion );
     }
 
     /**
@@ -102,74 +107,80 @@ public class JavaEEVersion
     /**
      * Specifies if this version is greater or equal to the specified version.
      * 
-     * @param version the version to check
+     * @param parmVersion the version to check
      * @return true if this version is greater or equal to <tt>version</tt>
      */
-    public boolean ge( JavaEEVersion version )
+    public boolean ge( JavaEEVersion parmVersion )
     {
-        return this.compareTo( version ) >= 0;
+        return this.compareTo( parmVersion ) >= 0;
     }
 
     /**
      * Specifies if this version is greater than the specified version.
      * 
-     * @param version the version to check
+     * @param paramVersion the version to check
      * @return true if this version is greater to <tt>version</tt>
      */
-    public boolean gt( JavaEEVersion version )
+    public boolean gt( JavaEEVersion paramVersion )
     {
-        return this.compareTo( version ) > 0;
+        return this.compareTo( paramVersion ) > 0;
     }
 
     /**
      * Specifies if this version is equal to the specified version.
      * 
-     * @param version the version to check
+     * @param paramVersion the version to check
      * @return true if this version is equal to <tt>version</tt>
      */
-    public boolean eq( JavaEEVersion version )
+    public boolean eq( JavaEEVersion paramVersion )
     {
-        return this.compareTo( version ) == 0;
+        return this.compareTo( paramVersion ) == 0;
     }
 
     /**
      * Specifies if this version is less or equal to the specified version.
      * 
-     * @param version the version to check
+     * @param paramVersion the version to check
      * @return true if this version is less or equal to <tt>version</tt>
      */
-    public boolean le( JavaEEVersion version )
+    public boolean le( JavaEEVersion paramVersion )
     {
-        return this.compareTo( version ) <= 0;
+        return this.compareTo( paramVersion ) <= 0;
     }
 
     /**
      * Specifies if this version is less than the specified version.
      * 
-     * @param version the version to check
+     * @param paramVersion the version to check
      * @return true if this version is less or equal to <tt>version</tt>
      */
-    public boolean lt( JavaEEVersion version )
+    public boolean lt( JavaEEVersion paramVersion )
     {
-        return this.compareTo( version ) < 0;
+        return this.compareTo( paramVersion ) < 0;
     }
 
     /**
      * Checks if the specified version string is valid.
      * 
-     * @param version the version string to check
+     * @param paramVersion the version string to check
      * @return <tt>true</tt> if the version is valid
      */
-    private static boolean isValid( String version )
+    private static boolean isValid( String paramVersion )
     {
-        if ( version == null )
+        if ( paramVersion == null )
         {
             throw new IllegalArgumentException( "version could not be null." );
         }
-        return VERSION_1_3.equals( version ) || VERSION_1_4.equals( version ) || VERSION_5.equals( version )
-            || VERSION_6.equals( version ) || VERSION_7.equals( version );
+        // @formatter:off
+        return VERSION_1_3.equals( paramVersion ) 
+            || VERSION_1_4.equals( paramVersion )
+            || VERSION_5.equals( paramVersion ) 
+            || VERSION_6.equals( paramVersion ) 
+            || VERSION_7.equals( paramVersion );
+        // @formatter:on
     }
 
+    /** {@inheritDoc} */
     public int compareTo( JavaEEVersion otherVersion )
     {
         if ( otherVersion == null )

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ModuleIdentifierValidator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ModuleIdentifierValidator.java?rev=1645331&r1=1645330&r2=1645331&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ModuleIdentifierValidator.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ModuleIdentifierValidator.java Sat Dec 13 17:31:09 2014
@@ -42,6 +42,9 @@ public class ModuleIdentifierValidator
 
     private Map<String, List<EarModule>> result;
 
+    /**
+     * @param earModules The list of {@link EarModule} which will be checked.
+     */
     public ModuleIdentifierValidator( List<EarModule> earModules )
     {
         if ( earModules == null )
@@ -104,23 +107,33 @@ public class ModuleIdentifierValidator
 
     }
 
+    /**
+     * @return A map of duplicate artifacts.
+     */
     public Map<String, List<EarModule>> getDuplicateArtifacts()
     {
         return result;
     }
 
+    /**
+     * @return The list of {@link EarModule}
+     */
     public List<EarModule> getEarModules()
     {
         return earModules;
     }
 
-    public ModuleIdentifierValidator setEarModules( List<EarModule> earModules )
+    /**
+     * @param paramEarModules {@link EarModule}
+     * @return {@link ModuleIdentifierValidator}
+     */
+    public ModuleIdentifierValidator setEarModules( List<EarModule> paramEarModules )
     {
-        if ( earModules == null )
+        if ( paramEarModules == null )
         {
             throw new IllegalArgumentException( "Not allowed to give null for earModules." );
         }
-        this.earModules = earModules;
+        this.earModules = paramEarModules;
         return this;
     }
 }
\ No newline at end of file



Mime
View raw message