You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2021/10/25 21:08:03 UTC

[maven-wrapper-plugin] branch wrapper-distribution updated (98f9779 -> 4820ec9)

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

hboutemy pushed a change to branch wrapper-distribution
in repository https://gitbox.apache.org/repos/asf/maven-wrapper-plugin.git.


 discard 98f9779  unpack wrapper distribution
     new 4820ec9  unpack wrapper distribution

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (98f9779)
            \
             N -- N -- N   refs/heads/wrapper-distribution (4820ec9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

[maven-wrapper-plugin] 01/01: unpack wrapper distribution

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

hboutemy pushed a commit to branch wrapper-distribution
in repository https://gitbox.apache.org/repos/asf/maven-wrapper-plugin.git

commit 4820ec9c98e5842d45045942ce87b66a87a655c0
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Mon Oct 25 19:24:36 2021 +0200

    unpack wrapper distribution
---
 .../apache/maven/plugins/wrapper/WrapperMojo.java  | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java b/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
index 224a284..804aef9 100644
--- a/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
+++ b/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java
@@ -48,7 +48,7 @@ import org.codehaus.plexus.archiver.UnArchiver;
 import org.codehaus.plexus.components.io.fileselectors.FileSelector;
 
 /**
- * Adds the maven-wrapper files to this project 
+ * Unpacks the maven-wrapper distribution files to the current project source tree. 
  * 
  * @author Robert Scholte
  * @since 3.0.0
@@ -66,7 +66,7 @@ public class WrapperMojo extends AbstractMojo
     private String mavenVersion;
 
     /**
-     * The version of the wrapper, default value is the Runtime version of Maven, should be at least 4
+     * The version of the wrapper distribution, default value is the Runtime version of Maven, should be at least 4
      */
     @Parameter( property = "wrapperVersion" )
     private String wrapperVersion;
@@ -101,11 +101,11 @@ public class WrapperMojo extends AbstractMojo
 
     // CONSTANTS
 
-    private static final String WRAPPER_GROUP_ID = "org.apache.maven";
+    private static final String WRAPPER_DISTRIBUTION_GROUP_ID = "org.apache.maven";
 
-    private static final String WRAPPER_ARTIFACT_ID = "apache-maven-wrapper";
+    private static final String WRAPPER_DISTRIBUTION_ARTIFACT_ID = "apache-maven-wrapper";
 
-    private static final String WRAPPER_EXTENSION = "zip";
+    private static final String WRAPPER_DISTRIBUTION_EXTENSION = "zip";
     
     // COMPONENTS 
     
@@ -128,7 +128,7 @@ public class WrapperMojo extends AbstractMojo
         Artifact artifact;
         try
         {
-            artifact = downloadWrapper( wrapperVersion );
+            artifact = downloadWrapperDistribution( wrapperVersion );
         }
         catch ( ArtifactResolverException e )
         {
@@ -158,18 +158,18 @@ public class WrapperMojo extends AbstractMojo
         }
     }
     
-    private Artifact downloadWrapper( String wrapperVersion )
+    private Artifact downloadWrapperDistribution( String wrapperVersion )
         throws ArtifactResolverException
     {
         ProjectBuildingRequest buildingRequest =
             new DefaultProjectBuildingRequest( session.getProjectBuildingRequest() );
 
         DefaultArtifactCoordinate coordinate = new DefaultArtifactCoordinate();
-        coordinate.setGroupId( WRAPPER_GROUP_ID );
-        coordinate.setArtifactId( WRAPPER_ARTIFACT_ID );
+        coordinate.setGroupId( WRAPPER_DISTRIBUTION_GROUP_ID );
+        coordinate.setArtifactId( WRAPPER_DISTRIBUTION_ARTIFACT_ID );
         coordinate.setVersion( wrapperVersion ); 
         coordinate.setClassifier( distributionType );
-        coordinate.setExtension( WRAPPER_EXTENSION );
+        coordinate.setExtension( WRAPPER_DISTRIBUTION_EXTENSION );
 
         return artifactResolver.resolveArtifact( buildingRequest, coordinate ).getArtifact();
     }
@@ -177,7 +177,7 @@ public class WrapperMojo extends AbstractMojo
     private void unpack( Artifact artifact, Path targetFolder ) throws IOException 
     {
         targetFolder = Files.createDirectories( targetFolder );
-        UnArchiver unarchiver = unarchivers.get( WRAPPER_EXTENSION );
+        UnArchiver unarchiver = unarchivers.get( WRAPPER_DISTRIBUTION_EXTENSION );
         unarchiver.setDestDirectory( targetFolder.toFile() );
         unarchiver.setSourceFile( artifact.getFile() );
         if ( !includeDebugScript )