You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2024/11/18 14:08:48 UTC

(maven-ear-plugin) branch clean created (now a5bbd80)

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

elharo pushed a change to branch clean
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git


      at a5bbd80  Clean up a bit of wonky code

This branch includes the following new commits:

     new a5bbd80  Clean up a bit of wonky code

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-ear-plugin) 01/01: Clean up a bit of wonky code

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a5bbd80c98ceb90fee7cde9ae04fb8551f13a81f
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon Nov 18 09:08:37 2024 -0500

    Clean up a bit of wonky code
---
 src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

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 9ed24ab..078f97c 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
@@ -110,6 +110,7 @@ public abstract class AbstractEarMojo extends AbstractMojo {
      *
      * @deprecated
      */
+    @Deprecated
     @Parameter
     private String fileNameMapping;
 
@@ -158,6 +159,7 @@ public abstract class AbstractEarMojo extends AbstractMojo {
     private JbossConfiguration jbossConfiguration;
 
     /** {@inheritDoc} */
+    @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
         if (fileNameMapping != null) {
             getLog().error("fileNameMapping has been removed with version 3.0.0. You are still using it.");
@@ -197,12 +199,9 @@ public abstract class AbstractEarMojo extends AbstractMojo {
         getLog().debug("Resolving ear modules ...");
         List<EarModule> allModules = new ArrayList<>();
         try {
-            if (modules != null && modules.length > 0) {
+            if (modules != null) {
                 // Let's validate user-defined modules
-                EarModule module;
-
-                for (EarModule module1 : modules) {
-                    module = module1;
+                for (EarModule module : modules) {
                     getLog().debug("Resolving ear module[" + module + "]");
                     module.setEarExecutionContext(earExecutionContext);
                     module.resolveArtifact(project.getArtifacts());