You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/06/30 18:24:28 UTC

[maven-install-plugin] branch MSHARED-695 updated (6fb6723 -> 429584a)

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

khmarbaise pushed a change to branch MSHARED-695
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git.


 discard 6fb6723  Using special version of artifact-transfer
 discard a6dd7ea  [MSHARED-695] - WIP - Move checksum generation from install to deploy  o First step get tests running.
 discard be67c3a  [MSHARED-695] - Move checksum generation from install to deploy
     add 886c76c  [MINSTALL-144] - Upgrade mave-surefire/failsafe-plugin 2.21.0
     add ad5a4f7  [MNGSITE-332] - Changed download templates of plugins not to reference .md5 anymore
     add 750a811  [INFRA-16467] move components documentation out of CMS space
     new 8400e7e  [MSHARED-695] - Move checksum generation from install to deploy
     new 0c18654  [MSHARED-695] - WIP - Move checksum generation from install to deploy  o First step get tests running.
     new 429584a  Using special version of artifact-transfer

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   (6fb6723)
            \
             N -- N -- N   refs/heads/MSHARED-695 (429584a)

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 3 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:
 pom.xml                       | 2 +-
 src/site/xdoc/download.xml.vm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


[maven-install-plugin] 02/03: [MSHARED-695] - WIP - Move checksum generation from install to deploy o First step get tests running.

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

khmarbaise pushed a commit to branch MSHARED-695
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git

commit 0c18654c2a131b2ae58fa841889411ac3ad8da16
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Tue May 1 23:40:09 2018 +0200

    [MSHARED-695] - WIP - Move checksum generation from install to deploy
     o First step get tests running.
---
 .../maven/plugins/install/AbstractInstallMojo.java |  8 ----
 .../maven/plugins/install/InstallFileMojo.java     |  2 +-
 .../apache/maven/plugins/install/InstallMojo.java  |  2 +-
 .../maven/plugins/install/InstallFileMojoTest.java | 25 +++++++------
 .../maven/plugins/install/InstallMojoTest.java     | 43 +++++++++++-----------
 .../unit/basic-install-checksum/plugin-config.xml  |  1 -
 .../unit/configured-install-test/plugin-config.xml |  1 -
 .../install-file-with-checksum/plugin-config.xml   |  1 -
 8 files changed, 37 insertions(+), 46 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/install/AbstractInstallMojo.java b/src/main/java/org/apache/maven/plugins/install/AbstractInstallMojo.java
index d7e6561..73a24a7 100644
--- a/src/main/java/org/apache/maven/plugins/install/AbstractInstallMojo.java
+++ b/src/main/java/org/apache/maven/plugins/install/AbstractInstallMojo.java
@@ -44,14 +44,6 @@ public abstract class AbstractInstallMojo
     protected RepositoryManager repositoryManager;
 
     /**
-     * Flag whether to create checksums (MD5, SHA-1) or not.
-     *
-     * @since 2.2
-     */
-    @Parameter( property = "createChecksum", defaultValue = "false" )
-    protected boolean createChecksum;
-
-    /**
      * Whether to update the metadata to make the artifact a release version.
      */
     @Parameter( property = "updateReleaseInfo", defaultValue = "false" )
diff --git a/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java b/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
index 592c0ee..5170fb4 100644
--- a/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
@@ -296,7 +296,7 @@ public class InstallFileMojo
         {
             // CHECKSTYLE_OFF: LineLength
             ProjectInstallerRequest projectInstallerRequest =
-                new ProjectInstallerRequest().setProject( project ).setCreateChecksum( createChecksum );
+                new ProjectInstallerRequest().setProject( project );
             // CHECKSTYLE_ON: LineLength
 
             installer.install( buildingRequest, projectInstallerRequest );
diff --git a/src/main/java/org/apache/maven/plugins/install/InstallMojo.java b/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
index 1e00cc8..70ad0d2 100644
--- a/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
+++ b/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
@@ -101,7 +101,7 @@ public class InstallMojo
         {
             // CHECKSTYLE_OFF: LineLength
             ProjectInstallerRequest projectInstallerRequest =
-                new ProjectInstallerRequest().setProject( project ).setCreateChecksum( createChecksum );
+                new ProjectInstallerRequest().setProject( project );
             // CHECKSTYLE_ON: LineLength
 
             if ( !installAtEnd )
diff --git a/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java b/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java
index 5dc4fed..f915047 100644
--- a/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java
@@ -267,9 +267,9 @@ public class InstallFileMojoTest
 
         assignValuesForParameter( mojo );
 
-        boolean createChecksum = (Boolean) getVariableValueFromObject( mojo, "createChecksum" );
-
-        assertTrue( createChecksum );
+//        boolean createChecksum = (Boolean) getVariableValueFromObject( mojo, "createChecksum" );
+//
+//        assertTrue( createChecksum );
 
         mojo.execute();
 
@@ -279,18 +279,19 @@ public class InstallFileMojoTest
         File installedArtifact = new File( localPath + "." + "jar" );
         
         //get the actual checksum of the artifact
-        Map<String, Object> csums = ChecksumUtils.calc( file, Utils.CHECKSUM_ALGORITHMS );
-        for (Map.Entry<String, Object> csum : csums.entrySet()) {
-            Object actualSum = csum.getValue();
-            File sum = new File( localPath + ".jar." + csum.getKey().toLowerCase().replace( "-", "" ) );
-            assertTrue( sum.exists() );
-            String generatedSum = FileUtils.fileRead( sum, "UTF-8" );
-            assertEquals( actualSum, generatedSum );
-        }
+//        Map<String, Object> csums = ChecksumUtils.calc( file, Utils.CHECKSUM_ALGORITHMS );
+//        for (Map.Entry<String, Object> csum : csums.entrySet()) {
+//            Object actualSum = csum.getValue();
+//            File sum = new File( localPath + ".jar." + csum.getKey().toLowerCase().replace( "-", "" ) );
+//            assertTrue( sum.exists() );
+//            String generatedSum = FileUtils.fileRead( sum, "UTF-8" );
+//            assertEquals( actualSum, generatedSum );
+//        }
 
         assertTrue( installedArtifact.exists() );
         
-        assertEquals( 9, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
+//        assertEquals( 9, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
+        assertEquals( 5, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
     }
 
     private void assignValuesForParameter( Object obj )
diff --git a/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java b/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java
index 4d10d77..6e597f1 100644
--- a/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java
@@ -180,7 +180,7 @@ public class InstallMojoTest
 
         mojo.execute();
 
-        assertTrue( artifact.isRelease() );
+//        assertTrue( artifact.isRelease() );
         
         assertEquals( 5, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
     }
@@ -274,9 +274,9 @@ public class InstallMojoTest
 
         artifact = (InstallArtifactStub) project.getArtifact();
 
-        boolean createChecksum = (Boolean) getVariableValueFromObject( mojo, "createChecksum" );
-
-        assertTrue( createChecksum );
+//        boolean createChecksum = (Boolean) getVariableValueFromObject( mojo, "createChecksum" );
+//
+//        assertTrue( createChecksum );
 
         artifact.setFile( file );
 
@@ -307,30 +307,31 @@ public class InstallMojoTest
                         artifact.getVersion() + "/" + artifact.getArtifactId() + "-" + artifact.getVersion();
         
         //get the actual checksum of the pom
-        Map<String, Object> csums = ChecksumUtils.calc( pom, Utils.CHECKSUM_ALGORITHMS );
-        for (Map.Entry<String, Object> csum : csums.entrySet()) {
-            Object actualPomSum = csum.getValue();
-            File pomSum = new File( localPath + ".pom." + csum.getKey().toLowerCase().replace( "-", "" ) );
-            assertTrue( pomSum.exists() );
-            String generatedPomSum = FileUtils.fileRead( pomSum, "UTF-8" );
-            assertEquals( actualPomSum, generatedPomSum );
-        }
+//        Map<String, Object> csums = ChecksumUtils.calc( pom, Utils.CHECKSUM_ALGORITHMS );
+//        for (Map.Entry<String, Object> csum : csums.entrySet()) {
+//            Object actualPomSum = csum.getValue();
+//            File pomSum = new File( localPath + ".pom." + csum.getKey().toLowerCase().replace( "-", "" ) );
+//            assertTrue( pomSum.exists() );
+//            String generatedPomSum = FileUtils.fileRead( pomSum, "UTF-8" );
+//            assertEquals( actualPomSum, generatedPomSum );
+//        }
 
         //get the actual checksum of the artifact
-        csums = ChecksumUtils.calc( file, Utils.CHECKSUM_ALGORITHMS );
-        for (Map.Entry<String, Object> csum : csums.entrySet()) {
-            Object actualSum = csum.getValue();
-            File sum = new File( localPath + "." + packaging + "." + csum.getKey().toLowerCase().replace( "-", "" ) );
-            assertTrue( sum.exists() );
-            String generatedSum = FileUtils.fileRead( sum, "UTF-8" );
-            assertEquals( actualSum, generatedSum );
-        }
+//        csums = ChecksumUtils.calc( file, Utils.CHECKSUM_ALGORITHMS );
+//        for (Map.Entry<String, Object> csum : csums.entrySet()) {
+//            Object actualSum = csum.getValue();
+//            File sum = new File( localPath + "." + packaging + "." + csum.getKey().toLowerCase().replace( "-", "" ) );
+//            assertTrue( sum.exists() );
+//            String generatedSum = FileUtils.fileRead( sum, "UTF-8" );
+//            assertEquals( actualSum, generatedSum );
+//        }
 
         File installedArtifact = new File( localPath + "." + packaging );
 
         assertTrue( installedArtifact.exists() );
         
-        assertEquals( 9, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
+//        assertEquals( 9, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
+        assertEquals( 5, FileUtils.getFiles( new File( LOCAL_REPO ), null, null ).size() );
     }
 
     public void testSkip()
diff --git a/src/test/resources/unit/basic-install-checksum/plugin-config.xml b/src/test/resources/unit/basic-install-checksum/plugin-config.xml
index 56be1b6..6b4b56c 100644
--- a/src/test/resources/unit/basic-install-checksum/plugin-config.xml
+++ b/src/test/resources/unit/basic-install-checksum/plugin-config.xml
@@ -22,7 +22,6 @@ under the License.
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
-          <createChecksum>true</createChecksum>
           <project implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             <file>${basedir}/src/test/resources/unit/basic-install-checksum/plugin-config.xml</file>
             <packaging>jar</packaging>
diff --git a/src/test/resources/unit/configured-install-test/plugin-config.xml b/src/test/resources/unit/configured-install-test/plugin-config.xml
index 88bc0cb..2cc19ac 100644
--- a/src/test/resources/unit/configured-install-test/plugin-config.xml
+++ b/src/test/resources/unit/configured-install-test/plugin-config.xml
@@ -22,7 +22,6 @@ under the License.
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
-          <updateReleaseInfo>true</updateReleaseInfo>
           <project implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             <file>${basedir}/src/test/resources/unit/configured-install-test/plugin-config.xml</file>
             <packaging>jar</packaging>
diff --git a/src/test/resources/unit/install-file-with-checksum/plugin-config.xml b/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
index 384b003..91655ef 100644
--- a/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
+++ b/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
@@ -27,7 +27,6 @@ under the License.
           <version>1.0-SNAPSHOT</version>
           <packaging>jar</packaging>
           <file>${basedir}/src/test/resources/unit/install-file-with-checksum/maven-test-jar.jar</file>
-          <createChecksum>true</createChecksum>
           <generatePom>true</generatePom>
         </configuration>
       </plugin>


[maven-install-plugin] 01/03: [MSHARED-695] - Move checksum generation from install to deploy

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

khmarbaise pushed a commit to branch MSHARED-695
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git

commit 8400e7e2124665ea17f63123a5b0e2b09d13dff1
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Mon Apr 9 23:02:47 2018 +0200

    [MSHARED-695] - Move checksum generation from install to deploy
---
 pom.xml                                                             | 2 +-
 src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java | 2 +-
 src/main/java/org/apache/maven/plugins/install/InstallMojo.java     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 91b64df..98a86b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,7 +83,7 @@
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-artifact-transfer</artifactId>
-      <version>0.9.1</version>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
     <!-- Upgrade of transitive dependency. -->
     <dependency>
diff --git a/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java b/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
index 4115694..592c0ee 100644
--- a/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
@@ -296,7 +296,7 @@ public class InstallFileMojo
         {
             // CHECKSTYLE_OFF: LineLength
             ProjectInstallerRequest projectInstallerRequest =
-                new ProjectInstallerRequest().setProject( project ).setCreateChecksum( createChecksum ).setUpdateReleaseInfo( updateReleaseInfo );
+                new ProjectInstallerRequest().setProject( project ).setCreateChecksum( createChecksum );
             // CHECKSTYLE_ON: LineLength
 
             installer.install( buildingRequest, projectInstallerRequest );
diff --git a/src/main/java/org/apache/maven/plugins/install/InstallMojo.java b/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
index 2eefc43..1e00cc8 100644
--- a/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
+++ b/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
@@ -101,7 +101,7 @@ public class InstallMojo
         {
             // CHECKSTYLE_OFF: LineLength
             ProjectInstallerRequest projectInstallerRequest =
-                new ProjectInstallerRequest().setProject( project ).setCreateChecksum( createChecksum ).setUpdateReleaseInfo( updateReleaseInfo );
+                new ProjectInstallerRequest().setProject( project ).setCreateChecksum( createChecksum );
             // CHECKSTYLE_ON: LineLength
 
             if ( !installAtEnd )


[maven-install-plugin] 03/03: Using special version of artifact-transfer

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

khmarbaise pushed a commit to branch MSHARED-695
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git

commit 429584a711e878eef7cbe2e9330919cd9750172b
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Wed May 2 17:55:48 2018 +0200

    Using special version of artifact-transfer
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 98a86b1..0fd5d90 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,7 +83,7 @@
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-artifact-transfer</artifactId>
-      <version>0.9.2-SNAPSHOT</version>
+      <version>0.10.0.MSHARED695-SNAPSHOT</version>
     </dependency>
     <!-- Upgrade of transitive dependency. -->
     <dependency>