You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/10/18 13:23:51 UTC

[maven-ear-plugin] branch master updated: [MEAR-321] Remove not implemented parameter - useBaseVersion

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

sjaranowski 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 1f946a7  [MEAR-321] Remove not implemented parameter - useBaseVersion
1f946a7 is described below

commit 1f946a798da09317d145181b4aee7e30802852bd
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun Oct 16 15:11:29 2022 +0200

    [MEAR-321] Remove not implemented parameter - useBaseVersion
---
 .../apache/maven/plugins/ear/AbstractEarMojo.java  | 21 ++++-------------
 .../examples/customize-file-name-mapping.apt.vm    | 26 +++++++++++++---------
 src/site/apt/index.apt.vm                          |  2 +-
 3 files changed, 20 insertions(+), 29 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 d9eaca5..1c0a244 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
@@ -118,23 +118,16 @@ public abstract class AbstractEarMojo
 
     /**
      * 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
-     * <a href="http://maven.apache.org/shared/maven-mapping/index.html">Maven Mapping Reference</a>.
-     * 
+     * file names which is used within the EAR file.
+     * Details see
+     * <a href="./examples/customize-file-name-mapping.html">Customizing The File Name Mapping</a>.
+     *
      * @since 3.0.0
      */
     @Parameter( defaultValue = "@{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@",
                 required = true )
     private String outputFileNameMapping;
 
-    /**
-     * 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.
-     */
-    @Parameter
-    private Boolean useBaseVersion;
-
     /**
      * Directory that resources are copied to during the build.
      */
@@ -210,12 +203,6 @@ public abstract class AbstractEarMojo
             new EarExecutionContext( project, mainArtifactId, defaultLibBundleDir, jbossConfiguration,
                                      outputFileNameMapping, typeMappingService );
 
-        if ( useBaseVersion != null )
-        {
-            getLog().warn( "Using useBaseVersion not yet fixed." );
-            // earExecutionContext.getOutputFileNameMapping().setUseBaseVersion( useBaseVersion );
-        }
-
         getLog().debug( "Resolving ear modules ..." );
         List<EarModule> allModules = new ArrayList<EarModule>();
         try
diff --git a/src/site/apt/examples/customize-file-name-mapping.apt.vm b/src/site/apt/examples/customize-file-name-mapping.apt.vm
index 3b7e79a..1072f87 100644
--- a/src/site/apt/examples/customize-file-name-mapping.apt.vm
+++ b/src/site/apt/examples/customize-file-name-mapping.apt.vm
@@ -27,14 +27,11 @@
 
 Customizing The File Name Mapping
 
-
-    @Parameter( defaultValue = "@{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@", required = true )
-    private String outputFileNameMapping;
-
-
-  It might happen that you need to change the naming of the artifacts within the EAR file. 
+  It might happen that you need to change the naming of the artifacts within the EAR file.
   This can be achieved by using the <<<outputFileNameMapping>>>. The following shows how it could be 
-  configured in your pom file. In this example the default value is given as a starting point.
+  configured in your pom file.
+
+  In this example the default value is given as a starting point.
 
 +--------
   <build>
@@ -71,7 +68,14 @@ Customizing The File Name Mapping
     </plugins>
   </build>
 +---------
-  
-  Just a some words about the <<<@{dashClassifier?}@>>> which expands to a classifier including the preceding
-  dash which is needed to separate it from other parts of the artifact.
-  
\ No newline at end of file
+
+  * <<<@\{dashClassifier?\}@>>> - expands to a classifier including the preceding
+  dash which is needed to separate it from other parts of the artifact
+
+  * <<<@\{version\}@>>> - expands to artifact version,
+  for <<<SNAPSHOT>>> artifacts can contain timestamp postfix instead of <<<SNAPSHOT>>>
+
+  * <<<@\{baseVersion\}@>>> - expands to base artifact version,
+  for <<<SNAPSHOT>>> artifacts we will always have <<<SNAPSHOT>>> postfix
+
+  []
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 0b0f870..21d2fe2 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -72,7 +72,7 @@ ${project.name}
 
   Starting with version 3.0.0 the usage of <<fileNameMapping>> has been removed. If you need
   to use a kind of file name mapping take a look at the new
-  {{{./ear-mojo.html#outputFileNameMapping}outputFileNameMapping}} which is more
+  {{{./examples/customize-file-name-mapping.html}outputFileNameMapping}} which is more
   flexible.
 
 * Goals Overview