You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/12/29 11:33:11 UTC

[maven-ear-plugin] 01/03: (doc) checkstyle issues cleanup

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch java11
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git

commit af60dfc5922db748013e340b3c86a6ebb9e8a82e
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Dec 29 12:03:35 2020 +0100

    (doc) checkstyle issues cleanup
---
 pom.xml                                                |  5 +++--
 .../org/apache/maven/plugins/ear/AbstractEarMojo.java  |  5 ++---
 .../java/org/apache/maven/plugins/ear/EarMojo.java     |  7 ++++---
 .../maven/plugins/ear/GenerateApplicationXmlMojo.java  | 18 ++++++------------
 .../apache/maven/plugins/ear/JbossConfiguration.java   |  5 ++---
 5 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/pom.xml b/pom.xml
index 61f698b..ac25fcb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     <artifactId>maven-plugins</artifactId>
     <groupId>org.apache.maven.plugins</groupId>
     <version>34</version>
-    <relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath>
+    <relativePath/>
   </parent>
 
   <artifactId>maven-ear-plugin</artifactId>
@@ -85,7 +85,6 @@
     <mavenVersion>3.1.1</mavenVersion>
     <javaVersion>7</javaVersion>
     <surefire.version>2.22.2</surefire.version>
-    <project.build.outputTimestamp>2020-09-26T20:10:30Z</project.build.outputTimestamp>
     <mavenWarPluginVersion>3.3.1</mavenWarPluginVersion>
     <mavenCompilerPluginVersion>2.5.1</mavenCompilerPluginVersion>
     <mavenEjbPluginVersion>3.1.0</mavenEjbPluginVersion>
@@ -96,6 +95,8 @@
     <invoker.install.skip>${invoker.skip}</invoker.install.skip>
     <invoker.it.skip>${invoker.skip}</invoker.it.skip>
     <invoker.cloneClean>true</invoker.cloneClean>
+    <checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
+    <project.build.outputTimestamp>2020-09-26T20:10:30Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>
diff --git a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
index db4be30..d3caef5 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
@@ -123,10 +123,9 @@ public abstract class AbstractEarMojo
      * 
      * @since 3.0.0
      */
-    // CHECKSTYLE_OFF: LineLength
-    @Parameter( defaultValue = "@{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@", required = true )
+    @Parameter( defaultValue = "@{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@",
+                required = true )
     private String outputFileNameMapping;
-    // CHECKSTYLE_ON: LineLength
 
     /**
      * When using a {@link #outputFileNameMapping} with versions, either use the {@code baseVersion} or the
diff --git a/src/main/java/org/apache/maven/plugins/ear/EarMojo.java b/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
index 3713c19..8ce8277 100644
--- a/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
@@ -83,9 +83,10 @@ import org.codehaus.plexus.util.StringUtils;
  * 
  * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
  */
-// CHECKSTYLE_OFF: LineLength
-@Mojo( name = "ear", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )
-// CHECKSTYLE_ON: LineLength
+@Mojo( name = "ear",
+       defaultPhase = LifecyclePhase.PACKAGE,
+       threadSafe = true,
+       requiresDependencyResolution = ResolutionScope.TEST )
 public class EarMojo
     extends AbstractEarMojo
 {
diff --git a/src/main/java/org/apache/maven/plugins/ear/GenerateApplicationXmlMojo.java b/src/main/java/org/apache/maven/plugins/ear/GenerateApplicationXmlMojo.java
index db14956..bb06f32 100644
--- a/src/main/java/org/apache/maven/plugins/ear/GenerateApplicationXmlMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/GenerateApplicationXmlMojo.java
@@ -45,9 +45,10 @@ import org.codehaus.plexus.util.FileUtils;
  * 
  * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
  */
-// CHECKSTYLE_OFF: LineLength
-@Mojo( name = "generate-application-xml", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )
-// CHECKSTYLE_ON: LineLength
+@Mojo( name = "generate-application-xml",
+       defaultPhase = LifecyclePhase.GENERATE_RESOURCES,
+       threadSafe = true,
+       requiresDependencyResolution = ResolutionScope.TEST )
 public class GenerateApplicationXmlMojo
     extends AbstractEarMojo
 {
@@ -365,7 +366,6 @@ public class GenerateApplicationXmlMojo
             getLog().debug( "buildEnvEntries: allEnvEntries size:" + allEnvEntries.length );
             for ( PlexusConfiguration envEntry : allEnvEntries )
             {
-                // CHECKSTYLE_OFF: LineLength
                 final String childDescription =
                     interpolate( ssi, envEntry.getChild( EnvEntry.DESCRIPTION ).getValue() );
                 final String childEnvEntryName =
@@ -376,7 +376,6 @@ public class GenerateApplicationXmlMojo
                     interpolate( ssi, envEntry.getChild( EnvEntry.ENV_ENTRY_VALUE ).getValue() );
                 final String childEnvLookupNameValue =
                     interpolate( ssi, envEntry.getChild( EnvEntry.ENV_LOOKUP_NAME ).getValue() );
-                // CHECKSTYLE_ON: LineLength
 
                 try
                 {
@@ -421,14 +420,12 @@ public class GenerateApplicationXmlMojo
 
             for ( PlexusConfiguration ejbEntry : allEjbEntries )
             {
-                // CHECKSTYLE_OFF: LineLength
                 final String childDescription =
                     interpolate( ssi, ejbEntry.getChild( EnvEntry.DESCRIPTION ).getValue() );
                 final String childEjbEntryName = interpolate( ssi, ejbEntry.getChild( EjbRef.EJB_NAME ).getValue() );
                 final String childEjbEntryType = interpolate( ssi, ejbEntry.getChild( EjbRef.EJB_TYPE ).getValue() );
                 final String childEjbLookupNameValue =
                     interpolate( ssi, ejbEntry.getChild( EjbRef.EJB_LOOKUP_NAME ).getValue() );
-                // CHECKSTYLE_ON: LineLength
 
                 try
                 {
@@ -479,7 +476,6 @@ public class GenerateApplicationXmlMojo
             {
                 getLog().debug( "Resources resEntry:" + resEntry.getName() );
 
-                // CHECKSTYLE_OFF: LineLength
                 final String childResRefName =
                     interpolate( ssi, resEntry.getChild( ResourceRef.RESOURCE_REF_NAME ).getValue() );
                 final String childResType =
@@ -488,13 +484,11 @@ public class GenerateApplicationXmlMojo
                     interpolate( ssi, resEntry.getChild( ResourceRef.RESOURCE_AUTH ).getValue() );
                 final String childResRefLookupName =
                     interpolate( ssi, resEntry.getChild( ResourceRef.LOOKUP_NAME ).getValue() );
-                // CHECKSTYLE_ON: LineLength
 
                 try
                 {
-                    // CHECKSTYLE_OFF: LineLength
-                    result.add( new ResourceRef( childResRefName, childResType, childResRefAuth, childResRefLookupName ) );
-                    // CHECKSTYLE_ON: LineLength
+                    result.add(
+                            new ResourceRef( childResRefName, childResType, childResRefAuth, childResRefLookupName ) );
                 }
                 catch ( IllegalArgumentException e )
                 {
diff --git a/src/main/java/org/apache/maven/plugins/ear/JbossConfiguration.java b/src/main/java/org/apache/maven/plugins/ear/JbossConfiguration.java
index dd5dd11..ef8354f 100644
--- a/src/main/java/org/apache/maven/plugins/ear/JbossConfiguration.java
+++ b/src/main/java/org/apache/maven/plugins/ear/JbossConfiguration.java
@@ -121,9 +121,8 @@ class JbossConfiguration
             }
             else
             {
-                // CHECKSTYLE_OFF: LineLength
-                throw new EarPluginException( "Invalid JBoss configuration, version[" + version + "] is not supported." );
-                // CHECKSTYLE_ON: LineLength
+                throw new EarPluginException(
+                        "Invalid JBoss configuration, version[" + version + "] is not supported." );
             }
             this.securityDomain = securityDomain;
             this.unauthenticatedPrincipal = unauthenticatedPrincipal;