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:23:40 UTC

[maven-deploy-plugin] branch MSHARED-695 updated (128bfb2 -> 6c3df7d)

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-deploy-plugin.git.


 discard 128bfb2  [MSHARED-695] - WIP - Move checksum generation from install to deploy  o stat of IT's. to check for checksums.
 discard 34dcf46  Upgrade maven-javadoc-plugin to version 3.0.0 to get it running in JDK 10.
 discard ff58ff0  Using special version from branch.
 discard fac5dbd  [MSHARED-695] - WIP - Move checksum generation from install to deploy
     add d78b115  [INFRA-16467] move components documentation out of CMS space
     new 966ec7d  [MSHARED-695] - WIP - Move checksum generation from install to deploy
     new 555e0e7  Using special version from branch.
     new ef55990  Upgrade maven-javadoc-plugin to version 3.0.0 to get it running in JDK 10.
     new 6c3df7d  [MSHARED-695] - WIP - Move checksum generation from install to deploy  o stat of IT's. to check for checksums.

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   (128bfb2)
            \
             N -- N -- N   refs/heads/MSHARED-695 (6c3df7d)

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 4 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 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[maven-deploy-plugin] 04/04: [MSHARED-695] - WIP - Move checksum generation from install to deploy o stat of IT's. to check for checksums.

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-deploy-plugin.git

commit 6c3df7de981c44345ad580d8cc1ac6069a0ca95e
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sat May 12 14:59:12 2018 +0200

    [MSHARED-695] - WIP - Move checksum generation from install to deploy
     o stat of IT's. to check for checksums.
---
 pom.xml                                            |  1 +
 src/it/attach-jar-checksum-release/pom.xml         | 89 ++++++++++++++++++++++
 src/it/attach-jar-checksum-release/setup.bsh       | 29 +++++++
 src/it/attach-jar-checksum-release/verify.groovy   | 63 +++++++++++++++
 src/it/attach-jar-checksum-snapshot/pom.xml        | 89 ++++++++++++++++++++++
 src/it/attach-jar-checksum-snapshot/setup.bsh      | 29 +++++++
 src/it/attach-jar-checksum-snapshot/verify.groovy  | 66 ++++++++++++++++
 .../org/apache/maven/plugins/deploy/Utils.java     | 64 ++++++++++++++++
 8 files changed, 430 insertions(+)

diff --git a/pom.xml b/pom.xml
index 521b56f..aa28e45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,6 +185,7 @@ under the License.
                 <postBuildHookScript>verify</postBuildHookScript>
                 <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                 <settingsFile>src/it/settings.xml</settingsFile>
+                <addTestClassPath>true</addTestClassPath>
                 <goals>
                   <goal>deploy</goal>
                 </goals>
diff --git a/src/it/attach-jar-checksum-release/pom.xml b/src/it/attach-jar-checksum-release/pom.xml
new file mode 100644
index 0000000..d0e28b0
--- /dev/null
+++ b/src/it/attach-jar-checksum-release/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.deploy.ajc</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <description>
+    This test has been moved from maven-install-plugin to maven-deploy-plugin.
+    Tests the installation of a simple snapshot JAR with an attached artifact and checksums
+  </description>
+
+  <properties>
+    <maven.test.skip>true</maven.test.skip>
+  </properties>
+  <distributionManagement>
+    <repository>
+      <id>it</id>
+      <url>file:///${basedir}/target/repo</url>
+    </repository>
+  </distributionManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.0.4</version>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.3.1</version>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/attach-jar-checksum-release/setup.bsh b/src/it/attach-jar-checksum-release/setup.bsh
new file mode 100644
index 0000000..9c52da8
--- /dev/null
+++ b/src/it/attach-jar-checksum-release/setup.bsh
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import java.util.*;
+
+import org.codehaus.plexus.util.*;
+
+File file = new File( localRepositoryPath, "org/apache/maven/its/install/ajc" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
diff --git a/src/it/attach-jar-checksum-release/verify.groovy b/src/it/attach-jar-checksum-release/verify.groovy
new file mode 100644
index 0000000..9a7376b
--- /dev/null
+++ b/src/it/attach-jar-checksum-release/verify.groovy
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import java.util.*;
+
+import org.apache.maven.plugins.deploy.Utils;
+
+def paths =
+[
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.pom",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.pom.md5",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.pom.sha1",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.jar",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.jar.md5",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.jar.sha1",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0-sources.jar",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0-sources.jar.md5",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0-sources.jar.sha1",
+    "org/apache/maven/its/deploy/ajc/test/maven-metadata.xml",
+    "org/apache/maven/its/deploy/ajc/test/maven-metadata.xml.md5",
+    "org/apache/maven/its/deploy/ajc/test/maven-metadata.xml.sha1",
+]
+
+def cksumToCheckPaths = [
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.pom",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0.jar",
+    "org/apache/maven/its/deploy/ajc/test/1.0/test-1.0-sources.jar"
+]
+
+def repository = new File (basedir, "target/repo" )
+paths.each { path ->
+    //File file = new File( localRepositoryPath, path );
+    File file = new File( repository, path );
+    println "Checking for existence of ${file}"
+    if ( !file.isFile() )
+    {
+        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+    }
+    if ( cksumToCheckPaths.contains( path ) )
+    {    
+        println "Verifying ${file}"
+        Utils.verifyChecksum( file );
+    }
+}
+
+return true;
diff --git a/src/it/attach-jar-checksum-snapshot/pom.xml b/src/it/attach-jar-checksum-snapshot/pom.xml
new file mode 100644
index 0000000..c81cc24
--- /dev/null
+++ b/src/it/attach-jar-checksum-snapshot/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.deploy.ajc</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <description>
+    This test has been moved from maven-install-plugin to maven-deploy-plugin.
+    Tests the installation of a simple snapshot JAR with an attached artifact and checksums
+  </description>
+
+  <properties>
+    <maven.test.skip>true</maven.test.skip>
+  </properties>
+  <distributionManagement>
+    <repository>
+      <id>it</id>
+      <url>file:///${basedir}/target/repo</url>
+    </repository>
+  </distributionManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.0.4</version>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.3.1</version>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/attach-jar-checksum-snapshot/setup.bsh b/src/it/attach-jar-checksum-snapshot/setup.bsh
new file mode 100644
index 0000000..9c52da8
--- /dev/null
+++ b/src/it/attach-jar-checksum-snapshot/setup.bsh
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import java.util.*;
+
+import org.codehaus.plexus.util.*;
+
+File file = new File( localRepositoryPath, "org/apache/maven/its/install/ajc" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
diff --git a/src/it/attach-jar-checksum-snapshot/verify.groovy b/src/it/attach-jar-checksum-snapshot/verify.groovy
new file mode 100644
index 0000000..b533981
--- /dev/null
+++ b/src/it/attach-jar-checksum-snapshot/verify.groovy
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import java.util.*;
+
+import org.apache.maven.plugins.deploy.Utils;
+
+def paths =
+[
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom.md5",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom.sha1",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar.md5",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar.sha1",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT-sources.jar",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT-sources.jar.md5",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT-sources.jar.sha1",
+    "org/apache/maven/its/deploy/ajc/test/maven-metadata.xml",
+    "org/apache/maven/its/deploy/ajc/test/maven-metadata.xml.md5",
+    "org/apache/maven/its/deploy/ajc/test/maven-metadata.xml.sha1",
+]
+
+def cksumToCheckPaths = [
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar",
+    "org/apache/maven/its/deploy/ajc/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT-sources.jar"
+]
+
+def buildLog = new File ( basedir, "build.log")
+
+
+def repository = new File (basedir, "target/repo" )
+paths.each { path ->
+    //File file = new File( localRepositoryPath, path );
+    File file = new File( repository, path );
+    println "Checking for existence of ${file}"
+    if ( !file.isFile() )
+    {
+        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+    }
+    if ( cksumToCheckPaths.contains( path ) )
+    {    
+        println "Verifying ${file}"
+        Utils.verifyChecksum( file );
+    }
+}
+
+return true;
diff --git a/src/test/java/org/apache/maven/plugins/deploy/Utils.java b/src/test/java/org/apache/maven/plugins/deploy/Utils.java
new file mode 100644
index 0000000..09949a6
--- /dev/null
+++ b/src/test/java/org/apache/maven/plugins/deploy/Utils.java
@@ -0,0 +1,64 @@
+package org.apache.maven.plugins.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.sonatype.aether.util.ChecksumUtils;
+
+/**
+ * A utility class to assist testing.
+ *
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class Utils
+{
+
+    public static final List<String> CHECKSUM_ALGORITHMS = Arrays.asList( "MD5", "SHA-1" );
+
+    /**
+     * Verifies the checksum files in the local repo for the given file.
+     *
+     * @param file The file to verify its checksum with, must not be <code>null</code>.
+     * @throws MojoExecutionException In case the checksums were incorrect.
+     * @throws IOException If the files couldn't be read.
+     */
+    public static void verifyChecksum( File file )
+        throws MojoExecutionException, IOException
+    {
+        Map<String, Object> checksums = ChecksumUtils.calc( file, CHECKSUM_ALGORITHMS );
+        for ( Map.Entry<String, Object> entry : checksums.entrySet() )
+        {
+            File cksumFile = new File( file + "." + entry.getKey().toLowerCase().replace( "-", "" ) );
+            String actualChecksum = ChecksumUtils.read( cksumFile );
+            if ( !actualChecksum.equals( entry.getValue() ) )
+            {
+                throw new MojoExecutionException( "Incorrect " + entry.getKey() + " checksum for file: " + file );
+            }
+        }
+    }
+
+}


[maven-deploy-plugin] 02/04: Using special version from branch.

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-deploy-plugin.git

commit 555e0e76b1124f690f7242d27adad0765b41f8f7
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Wed May 2 17:56:42 2018 +0200

    Using special version from branch.
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 74d72c5..521b56f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,7 +92,7 @@ under the License.
     <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>


[maven-deploy-plugin] 01/04: [MSHARED-695] - WIP - 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-deploy-plugin.git

commit 966ec7d9e5c12115c239e6b5e0912aa0eff6e3f5
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Wed Apr 11 19:49:07 2018 +0200

    [MSHARED-695] - WIP - Move checksum generation from install to deploy
---
 pom.xml                                            |  2 +-
 .../apache/maven/plugins/deploy/DeployMojo.java    |  6 +-
 .../maven/plugins/deploy/DeployMojoTest.java       | 74 +++++++++++-----------
 3 files changed, 43 insertions(+), 39 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1e4849d..74d72c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,7 +92,7 @@ under the License.
     <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/deploy/DeployMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
index 812b22d..229fd47 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
@@ -36,6 +36,7 @@ import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.artifact.deploy.ArtifactDeployerException;
 import org.apache.maven.shared.project.NoFileAssignedException;
 import org.apache.maven.shared.project.deploy.ProjectDeployer;
 import org.apache.maven.shared.project.deploy.ProjectDeployerRequest;
@@ -144,7 +145,6 @@ public class DeployMojo
             // @formatter:off
             ProjectDeployerRequest pdr = new ProjectDeployerRequest()
                 .setProject( project )
-                .setUpdateReleaseInfo( isUpdateReleaseInfo() )
                 .setRetryFailedDeploymentCount( getRetryFailedDeploymentCount() )
                 .setAltReleaseDeploymentRepository( altReleaseDeploymentRepository )
                 .setAltSnapshotDeploymentRepository( altSnapshotDeploymentRepository )
@@ -196,6 +196,10 @@ public class DeployMojo
         {
             throw new MojoExecutionException( "NoFileAssignedException", e );
         }
+        catch ( ArtifactDeployerException e )
+        {
+            throw new MojoExecutionException( "ArtifactDeployerException", e );
+        }
 
     }
 
diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
index 4db5b2d..9cf69eb 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
@@ -360,43 +360,43 @@ public class DeployMojoTest
         assertEquals( 0, getSizeOfExpectedFiles( fileList, expectedFiles ) );    
     }
 
-    public void testUpdateReleaseParamSetToTrue()
-        throws Exception
-    {
-        File testPom = new File( getBasedir(),
-                                 "target/test-classes/unit/basic-deploy-pom/plugin-config.xml" );
-        mojo = ( DeployMojo ) lookupMojo( "deploy", testPom );
-        
-        MockitoAnnotations.initMocks( this );
-        
-        assertNotNull( mojo );
-        
-        ProjectBuildingRequest buildingRequest = mock ( ProjectBuildingRequest.class );
-        when( session.getProjectBuildingRequest() ).thenReturn( buildingRequest );
-        MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( LOCAL_REPO ) );
-        when( buildingRequest.getRepositorySession() ).thenReturn( repositorySession );
-        
-        boolean updateReleaseInfo = (Boolean) getVariableValueFromObject(mojo, "updateReleaseInfo");
-        
-        assertTrue( updateReleaseInfo );
-        
-        MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "project" );
-
-        setVariableValueToObject( mojo, "reactorProjects", Collections.singletonList( project ) );
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-        
-        artifact.setFile( testPom );
-        
-        ArtifactRepositoryStub repo = getRepoStub( mojo );
-        
-        repo.setAppendToUrl( "basic-deploy-updateReleaseParam" );        
-        
-        mojo.execute();
-        
-        assertTrue( artifact.isRelease() );
-    }
+//    public void testUpdateReleaseParamSetToTrue()
+//        throws Exception
+//    {
+//        File testPom = new File( getBasedir(),
+//                                 "target/test-classes/unit/basic-deploy-pom/plugin-config.xml" );
+//        mojo = ( DeployMojo ) lookupMojo( "deploy", testPom );
+//        
+//        MockitoAnnotations.initMocks( this );
+//        
+//        assertNotNull( mojo );
+//        
+//        ProjectBuildingRequest buildingRequest = mock ( ProjectBuildingRequest.class );
+//        when( session.getProjectBuildingRequest() ).thenReturn( buildingRequest );
+//        MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
+//        repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( LOCAL_REPO ) );
+//        when( buildingRequest.getRepositorySession() ).thenReturn( repositorySession );
+//        
+//        boolean updateReleaseInfo = (Boolean) getVariableValueFromObject(mojo, "updateReleaseInfo");
+//        
+//        assertTrue( updateReleaseInfo );
+//        
+//        MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "project" );
+//
+//        setVariableValueToObject( mojo, "reactorProjects", Collections.singletonList( project ) );
+//
+//        artifact = (DeployArtifactStub) project.getArtifact();
+//        
+//        artifact.setFile( testPom );
+//        
+//        ArtifactRepositoryStub repo = getRepoStub( mojo );
+//        
+//        repo.setAppendToUrl( "basic-deploy-updateReleaseParam" );        
+//        
+//        mojo.execute();
+//        
+//        assertTrue( artifact.isRelease() );
+//    }
 
     public void testDeployIfArtifactFileIsNull()
         throws Exception


[maven-deploy-plugin] 03/04: Upgrade maven-javadoc-plugin to version 3.0.0 to get it running in JDK 10.

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-deploy-plugin.git

commit ef559906830236a7ca563c53a42e85ee1530a9c3
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Wed May 2 21:38:36 2018 +0200

    Upgrade maven-javadoc-plugin to version 3.0.0 to get
    it running in JDK 10.
---
 src/it/MDEPLOY-212/pom.xml             | 2 +-
 src/it/MDEPLOY-213/pom.xml             | 2 +-
 src/it/deploy-attached-sources/pom.xml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/it/MDEPLOY-212/pom.xml b/src/it/MDEPLOY-212/pom.xml
index a46c8e7..45c8913 100644
--- a/src/it/MDEPLOY-212/pom.xml
+++ b/src/it/MDEPLOY-212/pom.xml
@@ -38,7 +38,7 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.7</version>
+        <version>3.0.0</version>
         <executions>
           <execution>
             <id>attach-javadoc</id>
diff --git a/src/it/MDEPLOY-213/pom.xml b/src/it/MDEPLOY-213/pom.xml
index 7688d37..57a035e 100644
--- a/src/it/MDEPLOY-213/pom.xml
+++ b/src/it/MDEPLOY-213/pom.xml
@@ -46,7 +46,7 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.7</version>
+        <version>3.0.0</version>
         <executions>
           <execution>
             <id>attach-javadoc</id>
diff --git a/src/it/deploy-attached-sources/pom.xml b/src/it/deploy-attached-sources/pom.xml
index 8dbaec1..37ca126 100644
--- a/src/it/deploy-attached-sources/pom.xml
+++ b/src/it/deploy-attached-sources/pom.xml
@@ -62,7 +62,7 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.7</version>
+        <version>3.0.0</version>
         <executions>
           <execution>
             <id>attach-javadoc</id>