[maven-ear-plugin] 01/01: Code cleanups

2018-03-07 Thread khmarbaise
This is an automated email from the ASF dual-hosted git repository.

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

commit b91eccfa961c669aff144be552a5fe4a48aa08ca
Author: Karl Heinz Marbaise 
AuthorDate: Wed Mar 7 22:15:58 2018 +0100

Code cleanups
---
 .../org/apache/maven/plugins/ear/AbstractEarModule.java |  1 -
 .../java/org/apache/maven/plugins/ear/AbstractEarMojo.java  |  9 +
 src/main/java/org/apache/maven/plugins/ear/EarMojo.java | 13 +
 3 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java 
b/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java
index 34cda4c..8ceb14b 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java
@@ -250,7 +250,6 @@ public abstract class AbstractEarModule
 try
 {
 String outputFileNameMapping = 
earExecutionContext.getOutputFileNameMapping();
-System.out.println( "*** outputFileNameMapping:" + 
outputFileNameMapping );
 bundleFileName = MappingUtils.evaluateFileNameMapping( 
outputFileNameMapping, artifact );
 }
 catch ( InterpolationException e )
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 bc258db..a7d2964 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
@@ -29,12 +29,10 @@ import 
org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.ear.util.ArtifactTypeMappingService;
 import org.apache.maven.plugins.ear.util.JavaEEVersion;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.shared.filtering.MavenResourcesFiltering;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 
@@ -129,11 +127,9 @@ public abstract class AbstractEarMojo
 // CHECKSTYLE_ON: LineLength
 
 /**
- * When using a {@link #fileNameMapping} with versions, either use the 
{@code baseVersion} or the {@code version}.
+ * When using a {@link #outputFileNameMapping} 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 FIXME: Check what exactly this means!!!
  */
 @Parameter
 private Boolean useBaseVersion;
@@ -167,9 +163,6 @@ public abstract class AbstractEarMojo
 @Parameter( defaultValue = "${project.build.directory}", required = true )
 private File tempFolder;
 
-@Component
-private MavenResourcesFiltering mavenResourcesFiltering;
-
 private List earModules;
 
 private List allJarModules;
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 b671adf..df089bd 100644
--- a/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
@@ -258,16 +258,6 @@ public class EarMojo
 @Parameter( defaultValue = "true" )
 private boolean useJvmChmod = true;
 
-/**
- * The list of artifacts is checked and if you set this to {@code true} 
the build will fail if duplicate artifacts
- * have been found within the build configuration.
- * 
- * @since 2.10
- */
-// TODO: This can be removed if we change to full unique identifiers in 
EAR (next major version!)
-@Parameter( defaultValue = "false", property = 
"maven.ear.duplicateArtifactsBreakTheBuild" )
-private boolean duplicateArtifactsBreakTheBuild;
-
 /** {@inheritDoc} */
 public void execute()
 throws MojoExecutionException, MojoFailureException
@@ -741,7 +731,7 @@ public class EarMojo
 if ( module.getLibDir() != null )
 {
 // MEAR-189:
-// We use the original name, cause in case of 
fileNameMapping to no-version/full
+// We use the original name, cause in case of 
outputFileNameMapping
 // we could not not delete it and it will end up in the 
resulting EAR and the WAR
 // will not be cleaned up.
 // CHECKSTYLE_OFF: LineLength
@@ -753,7 +743,6 @@ public class EarMojo
  

[maven-ear-plugin] 01/01: Code cleanups

2018-03-07 Thread khmarbaise
This is an automated email from the ASF dual-hosted git repository.

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

commit 7d03543b87b751bd0ce237e574de8f905276ac8b
Author: Karl Heinz Marbaise 
AuthorDate: Wed Mar 7 22:15:58 2018 +0100

Code cleanups
---
 .../org/apache/maven/plugins/ear/AbstractEarModule.java |  1 -
 .../java/org/apache/maven/plugins/ear/AbstractEarMojo.java  |  9 +
 src/main/java/org/apache/maven/plugins/ear/EarMojo.java | 13 +
 3 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java 
b/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java
index 34cda4c..8ceb14b 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarModule.java
@@ -250,7 +250,6 @@ public abstract class AbstractEarModule
 try
 {
 String outputFileNameMapping = 
earExecutionContext.getOutputFileNameMapping();
-System.out.println( "*** outputFileNameMapping:" + 
outputFileNameMapping );
 bundleFileName = MappingUtils.evaluateFileNameMapping( 
outputFileNameMapping, artifact );
 }
 catch ( InterpolationException e )
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 bc258db..a7d2964 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
@@ -29,12 +29,10 @@ import 
org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.ear.util.ArtifactTypeMappingService;
 import org.apache.maven.plugins.ear.util.JavaEEVersion;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.shared.filtering.MavenResourcesFiltering;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 
@@ -129,11 +127,9 @@ public abstract class AbstractEarMojo
 // CHECKSTYLE_ON: LineLength
 
 /**
- * When using a {@link #fileNameMapping} with versions, either use the 
{@code baseVersion} or the {@code version}.
+ * When using a {@link #outputFileNameMapping} 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 FIXME: Check what exactly this means!!!
  */
 @Parameter
 private Boolean useBaseVersion;
@@ -167,9 +163,6 @@ public abstract class AbstractEarMojo
 @Parameter( defaultValue = "${project.build.directory}", required = true )
 private File tempFolder;
 
-@Component
-private MavenResourcesFiltering mavenResourcesFiltering;
-
 private List earModules;
 
 private List allJarModules;
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 b671adf..df089bd 100644
--- a/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
@@ -258,16 +258,6 @@ public class EarMojo
 @Parameter( defaultValue = "true" )
 private boolean useJvmChmod = true;
 
-/**
- * The list of artifacts is checked and if you set this to {@code true} 
the build will fail if duplicate artifacts
- * have been found within the build configuration.
- * 
- * @since 2.10
- */
-// TODO: This can be removed if we change to full unique identifiers in 
EAR (next major version!)
-@Parameter( defaultValue = "false", property = 
"maven.ear.duplicateArtifactsBreakTheBuild" )
-private boolean duplicateArtifactsBreakTheBuild;
-
 /** {@inheritDoc} */
 public void execute()
 throws MojoExecutionException, MojoFailureException
@@ -741,7 +731,7 @@ public class EarMojo
 if ( module.getLibDir() != null )
 {
 // MEAR-189:
-// We use the original name, cause in case of 
fileNameMapping to no-version/full
+// We use the original name, cause in case of 
outputFileNameMapping
 // we could not not delete it and it will end up in the 
resulting EAR and the WAR
 // will not be cleaned up.
 // CHECKSTYLE_OFF: LineLength
@@ -753,7 +743,6 @@ public class EarMojo