This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git
The following commit(s) were added to refs/heads/master by this push: new 166ee6a Clean up a bit of wonky code (#125) 166ee6a is described below commit 166ee6a7c3c51ab73d388c438094981b4f0aa83d Author: Elliotte Rusty Harold <elh...@users.noreply.github.com> AuthorDate: Mon Nov 18 15:02:57 2024 +0000 Clean up a bit of wonky code (#125) * Clean up a bit of wonky code * better javadoc --- .../apache/maven/plugins/ear/AbstractEarMojo.java | 28 +++++++++------------- 1 file changed, 11 insertions(+), 17 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..77bda2a 100644 --- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java +++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java @@ -105,18 +105,18 @@ public abstract class AbstractEarMojo extends AbstractMojo { private Boolean includeLibInApplicationXml = Boolean.FALSE; /** - * Only here to identify migration issues. The usage of this parameter will fail the build. If you need file name - * mapping please use {@link #outputFileNameMapping} instead. + * Only here to identify migration issues. The usage of this parameter will fail the build. * - * @deprecated + * @deprecated use {@link #outputFileNameMapping} */ + @Deprecated @Parameter private String fileNameMapping; /** * The file name mapping to use for all dependencies included in the EAR file. The mapping between artifacts and the * file names which is used within the EAR file. - * Details see + * See * <a href="./examples/customize-file-name-mapping.html">Customizing The File Name Mapping</a>. * * @since 3.0.0 @@ -134,17 +134,13 @@ public abstract class AbstractEarMojo extends AbstractMojo { /** * The JBoss specific configuration. - * - * @parameter */ @Parameter private PlexusConfiguration jboss; /** - * The id to use to define the main artifact (e.g. the artifact without a classifier) when there is multiple + * The id to use to define the main artifact (e.g. the artifact without a classifier) when there are multiple * candidates. - * - * @parameter */ @Parameter private String mainArtifactId = "none"; @@ -158,6 +154,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 +194,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()); @@ -236,7 +230,7 @@ public abstract class AbstractEarMojo extends AbstractMojo { throw new MojoExecutionException("Failed to initialize ear modules", e); } - // Now we have everything let's built modules which have not been excluded + // Now we have everything. Let's build modules which have not been excluded ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME); allEarModules = new ArrayList<>(); providedEarModules = new ArrayList<>(); @@ -256,7 +250,7 @@ public abstract class AbstractEarMojo extends AbstractMojo { } /** - * @return The list of {@link #earModules}. This corresponds to modules needed at runtime. + * @return the list of {@link #earModules}. This corresponds to modules needed at runtime. */ protected List<EarModule> getModules() { if (earModules == null) { @@ -266,7 +260,7 @@ public abstract class AbstractEarMojo extends AbstractMojo { } /** - * @return The list of {@link #allEarModules}. This corresponds to all modules (provided + compile + runtime). + * @return the list of {@link #allEarModules}. This corresponds to all modules (provided + compile + runtime). */ protected List<EarModule> getAllEarModules() { if (allEarModules == null) {