You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2015/10/18 14:50:46 UTC

svn commit: r1709276 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/MDEPLOY-202_deployfile-with-multiple-executions/ it/MDEPLOY-202_deployfile-with-multiple-executions/lib/ it/MDEPLOY-202_deployfile-with-multiple-executions/target/ it/MDEPLOY-20...

Author: rfscholte
Date: Sun Oct 18 12:50:46 2015
New Revision: 1709276

URL: http://svn.apache.org/viewvc?rev=1709276&view=rev
Log:
MDEPLOY-202: deploy-file goal insists on deploying source file for previous deploy-file execution

Added:
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common.source_1.0.jar   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common_1.0.jar   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi.source_1.0.jar   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi_1.0.jar   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/pom.xml
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/   (with props)
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.equinox.common.pom
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.osgi.pom
    maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/verify.groovy
Modified:
    maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java
    maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
    maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactDeployerStub.java

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Oct 18 12:50:46 2015
@@ -0,0 +1 @@
+MDEPLOY-\d+

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Oct 18 12:50:46 2015
@@ -0,0 +1 @@
+MDEPLOY-\d+

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common.source_1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common.source_1.0.jar?rev=1709276&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common.source_1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common_1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common_1.0.jar?rev=1709276&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.equinox.common_1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi.source_1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi.source_1.0.jar?rev=1709276&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi.source_1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi_1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi_1.0.jar?rev=1709276&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/lib/org.eclipse.osgi_1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/pom.xml?rev=1709276&view=auto
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/pom.xml (added)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/pom.xml Sun Oct 18 12:50:46 2015
@@ -0,0 +1,100 @@
+<?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.mdeploy-170</groupId>
+  <artifactId>configperproject</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <description>
+    Tests file deployment with multiple execution blocks
+  </description>
+
+  <url>https://issues.apache.org/jira/browse/MDEPLOY-202</url>
+
+  <properties>
+    <maven.test.skip>true</maven.test.skip>
+    
+    <downloaded>lib</downloaded>
+    <org.eclipse.osgi>1.0</org.eclipse.osgi>
+    <org.eclipse.equinox.common>1.0</org.eclipse.equinox.common>
+  </properties>
+
+  <distributionManagement>
+    <repository>
+      <id>it</id>
+      <url>file:///${basedir}/target/repo</url>
+      <uniqueVersion>false</uniqueVersion>
+    </repository>
+  </distributionManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <url>file:target/repo</url>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>deploy-equinox-snapshots</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-deploy-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>deploy-osgi</id>
+                <goals>
+                  <goal>deploy-file</goal>
+                </goals>
+                <phase>deploy</phase>
+                <configuration>
+                  <file>${downloaded}/org.eclipse.osgi_${org.eclipse.osgi}.jar</file>
+                  <sources>${downloaded}/org.eclipse.osgi.source_${org.eclipse.osgi}.jar</sources>
+                  <pomFile>${project.build.outputDirectory}/org.eclipse.osgi.pom</pomFile>
+                </configuration>
+              </execution>
+              <execution>
+                <id>deploy-equinox-common</id>
+                <goals>
+                  <goal>deploy-file</goal>
+                </goals>
+                <phase>deploy</phase>
+                <configuration>
+                  <file>${downloaded}/org.eclipse.equinox.common_${org.eclipse.equinox.common}.jar</file>
+                  <sources>${downloaded}/org.eclipse.equinox.common.source_${org.eclipse.equinox.common}.jar</sources>
+                  <pomFile>${project.build.outputDirectory}/org.eclipse.equinox.common.pom</pomFile>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Oct 18 12:50:46 2015
@@ -0,0 +1 @@
+MDEPLOY-\d+

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Oct 18 12:50:46 2015
@@ -0,0 +1 @@
+MDEPLOY-\d+

Propchange: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.equinox.common.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.equinox.common.pom?rev=1709276&view=auto
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.equinox.common.pom (added)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.equinox.common.pom Sun Oct 18 12:50:46 2015
@@ -0,0 +1,20 @@
+<?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.plugins.deploy.it</groupId>
+  <artifactId>org.eclipse.equinox.common</artifactId>
+  <version>1.0</version>
+</project>
\ No newline at end of file

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.osgi.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.osgi.pom?rev=1709276&view=auto
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.osgi.pom (added)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/target/classes/org.eclipse.osgi.pom Sun Oct 18 12:50:46 2015
@@ -0,0 +1,20 @@
+<?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.plugins.deploy.it</groupId>
+  <artifactId>org.eclipse.osgi</artifactId>
+  <version>1.0</version>
+</project>
\ No newline at end of file

Added: maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/verify.groovy?rev=1709276&view=auto
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/verify.groovy (added)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/MDEPLOY-202_deployfile-with-multiple-executions/verify.groovy Sun Oct 18 12:50:46 2015
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+def buildLog = new File ( basedir, "build.log")
+
+assert 1 == buildLog.text.count( 'Uploading: file:target/repo/org/apache/maven/plugins/deploy/it/org.eclipse.osgi/1.0/org.eclipse.osgi-1.0-sources.jar')
\ No newline at end of file

Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java?rev=1709276&r1=1709275&r2=1709276&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/AbstractDeployMojo.java Sun Oct 18 12:50:46 2015
@@ -155,7 +155,7 @@ public abstract class AbstractDeployMojo
                                        + retryFailedDeploymentCounter );
                 }
                 
-                getDeployer().deploy( session.getProjectBuildingRequest(), artifacts );
+                getDeployer().deploy( session.getProjectBuildingRequest(), deploymentRepository, artifacts );
                 exception = null;
                 break;
             }

Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java?rev=1709276&r1=1709275&r2=1709276&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java Sun Oct 18 12:50:46 2015
@@ -373,12 +373,22 @@ public class DeployFileMojo
 
         if ( sources != null )
         {
-            projectHelper.attachArtifact( project, "jar", "sources", sources );
+            Artifact sourcesArtifact =
+                artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, "jar", "sources" );
+
+            sourcesArtifact.setFile( sources );
+
+            deployableArtifacts.add( sourcesArtifact );
         }
 
         if ( javadoc != null )
         {
-            projectHelper.attachArtifact( project, "jar", "javadoc", javadoc );
+            Artifact javadocArtifact =
+                artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, "jar", "javadoc" );
+
+            javadocArtifact.setFile( javadoc );
+
+            deployableArtifacts.add( javadocArtifact );
         }
 
         if ( files != null )

Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactDeployerStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactDeployerStub.java?rev=1709276&r1=1709275&r2=1709276&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactDeployerStub.java (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactDeployerStub.java Sun Oct 18 12:50:46 2015
@@ -22,6 +22,7 @@ package org.apache.maven.plugin.deploy.s
 import java.util.Collection;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.shared.artifact.deploy.ArtifactDeployer;
 import org.apache.maven.shared.artifact.deploy.ArtifactDeployerException;
@@ -35,5 +36,12 @@ public class ArtifactDeployerStub
         throws ArtifactDeployerException
     {
         // does nothing
+    }
+
+    @Override
+    public void deploy( ProjectBuildingRequest arg0, ArtifactRepository arg1, Collection<Artifact> arg2 )
+        throws ArtifactDeployerException
+    {
+        // does nothing
     }
 }