You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2017/04/26 18:03:25 UTC
svn commit: r1792785 -
/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugins/ear/EarModuleFactory.java
Author: khmarbaise
Date: Wed Apr 26 18:03:25 2017
New Revision: 1792785
URL: http://svn.apache.org/viewvc?rev=1792785&view=rev
Log:
Code improvement.
Modified:
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugins/ear/EarModuleFactory.java
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugins/ear/EarModuleFactory.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugins/ear/EarModuleFactory.java?rev=1792785&r1=1792784&r2=1792785&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugins/ear/EarModuleFactory.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugins/ear/EarModuleFactory.java Wed Apr 26 18:03:25 2017
@@ -19,14 +19,14 @@ package org.apache.maven.plugins.ear;
* under the License.
*/
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugins.ear.util.ArtifactTypeMappingService;
import org.apache.maven.plugins.ear.util.JavaEEVersion;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
/**
* Builds an {@link EarModule} based on an <tt>Artifact</tt>.
*
@@ -38,23 +38,9 @@ public final class EarModuleFactory
/**
* The list of artifact types.
*/
- public static final List<String> STANDARD_ARTIFACT_TYPE;
-
- static
- {
- List<String> temp = new ArrayList<String>();
- temp.add( "jar" );
- temp.add( "ejb" );
- temp.add( "par" );
- temp.add( "ejb-client" );
- temp.add( "app-client" );
- temp.add( "rar" );
- temp.add( "war" );
- temp.add( "sar" );
- temp.add( "wsr" );
- temp.add( "har" );
- STANDARD_ARTIFACT_TYPE = Collections.unmodifiableList( temp );
- }
+ public static final List<String> STANDARD_ARTIFACT_TYPE =
+ Collections.unmodifiableList( Arrays.asList( "jar", "ejb", "par", "ejb-client", "app-client", "rar", "war",
+ "sar", "wsr", "har" ) );
/**
* Creates a new {@link EarModule} based on the specified {@link Artifact} and the specified execution
@@ -71,8 +57,9 @@ public final class EarModuleFactory
*/
// CHECKSTYLE_OFF: LineLength
public static EarModule newEarModule( Artifact artifact, JavaEEVersion javaEEVersion, String defaultLibBundleDir,
- Boolean includeInApplicationXml, ArtifactTypeMappingService typeMappingService )
- // CHECKSTYLE_ON: LineLength
+ Boolean includeInApplicationXml,
+ ArtifactTypeMappingService typeMappingService )
+ // CHECKSTYLE_ON: LineLength
throws UnknownArtifactTypeException
{
// Get the standard artifact type based on default config and user-defined mapping(s)