You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/04/02 07:00:13 UTC

[I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

jira-importer opened a new issue, #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** opened **[MDEPLOY-202](https://issues.apache.org/jira/browse/MDEPLOY-202?redirect=false)** and commented
   
   In a releng pom I deploy various files to a repository. Each file is in its own execution. Beside the binary file I also want to deploy the source jar:
   
   ```xml
   <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>
             <execution>
               <id>deploy-equinox-security</id>
               <goals>
                 <goal>deploy-file</goal>
               </goals>
               <phase>deploy</phase>
               <configuration>
                 <file>${downloaded}/org.eclipse.equinox.security_${org.eclipse.equinox.security}.jar</file>
                 <sources>${downloaded}/org.eclipse.equinox.security.source_${org.eclipse.equinox.security}.jar</sources>
                 <pomFile>${project.build.outputDirectory}/org.eclipse.equinox.security.pom</pomFile>
               </configuration>
             </execution>
             <execution>
               <id>deploy-equinox-registry</id>
               <goals>
                 <goal>deploy-file</goal>
               </goals>
               <phase>deploy</phase>
               <configuration>
                 <file>${downloaded}/org.eclipse.equinox.registry_${org.eclipse.equinox.registry}.jar</file>
                 <sources>${downloaded}/org.eclipse.equinox.registry.source_${org.eclipse.equinox.registry}.jar</sources>
                 <pomFile>${project.build.outputDirectory}/org.eclipse.equinox.registry.pom</pomFile>
               </configuration>
             </execution>
             <execution>
               <id>deploy-equinox-preferences</id>
               <goals>
                 <goal>deploy-file</goal>
               </goals>
               <phase>deploy</phase>
               <configuration>
                 <file>${downloaded}/org.eclipse.equinox.preferences_${org.eclipse.equinox.preferences}.jar</file>
                 <sources>${downloaded}/org.eclipse.equinox.preferences.source_${org.eclipse.equinox.preferences}.jar</sources>
                 <pomFile>${project.build.outputDirectory}/org.eclipse.equinox.preferences.pom</pomFile>
               </configuration>
             </execution>
           </executions>
         </plugin>
       </plugins>
     </build>
   </profile>
   ```
   
   The first execution works fine but every other execution deploys again the source files from all past executions. Although this works for SNAPSHOTS it breaks for RELEASES as a released file shouldn't/can't be overwritten.
   
   
   ---
   
   **Affects:** 2.8.1, 2.8.2
   
   **Attachments:**
   - [MDEPLOY-202-DeployFileMojo.patch](https://issues.apache.org/jira/secure/attachment/12764391/MDEPLOY-202-DeployFileMojo.patch) (_521 bytes_)
   
   This issue is a sub-task of [MDEPLOY-143](https://issues.apache.org/jira/browse/MDEPLOY-143)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516385

   **[Matthias Hanisch](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=matze)** commented
   
   Looking at the commit for this issue it seems to me that this really does not fix my case where the attachment was not added within a deploy-file configuration but within the normal project lifecycle - in my case by maven-source-plugin and maven-javadoc-plugin.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516335

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   Here is the full pom: https://git.eclipse.org/c/scout/org.eclipse.scout.sdk.git/tree/org.eclipse.scout.sdk.s2e.releng/pom.xml?h=releases/5.2.x
   
   And here the broken build where I wanted to deploy the "release" versions of the dependencies: https://hudson.eclipse.org/scout/job/org.eclipse.scout.sdk.dependencies/20/console
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516347

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   This doesn't work as all files have different artifactIds and versions.
   
   What about the patch I provided? Why can't it be applied and a new version of this plugin released?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516352

   **[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
   
   That will the status of the current MavenProject. And I know that someone will ask for the same solution with the `maven-install-plugin`, so that should be a sign that this is not the correct solution.
   IMHO it is still wrong to use `deploy-file` as part of the build-lifecycle. These jars are static, so there's no need to upload them as part of the lifecycle, right?
   `deploy-file` was very useful in the past when there were no good repository manager GUIs which gave you the option to upload artifacts.
   
   However, I think there's indeed an issue with the code: it should not abuse the current `MavenProject`. It would be better to create a new MavenProject instance in case of the `deploy-file` goal.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516338

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   What is the state of this issue? Can I help somehow? I depend on a solution of this as I don't see a (easy) workaround.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516355

   **[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
   
   Fixed in [r1709276](http://svn.apache.org/r1709276)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516361

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   Thanks, unfortunately I can't test it as org.apache.maven.plugins:maven-plugins:pom:28-SNAPSHOT doesn't seem to be deployed on http://repository.apache.org/snapshots:
   https://hudson.eclipse.org/scout/job/org.eclipse.scout.sdk.dependencies/24/console
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516339

   **[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
   
   If these are all files with the same groupId/artifactId/version, then the correct solution is to use http://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516368

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   This worked so far. But now I get the next error. It seems the deploy-plugin doesn't use the authentication entries from the settings.xml. Here the log with debug output: https://hudson.eclipse.org/scout/job/org.eclipse.scout.sdk.dependencies/26/console
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516373

   **[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
   
   Good catch! That part has been rewritten, so we can use Aether more efficiently (hence the 3.0 version). Should be fixed with [r1709672](http://svn.apache.org/r1709672)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516325

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   This solves the described issue.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516379

   **[Matthias Hanisch](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=matze)** commented
   
   Sorry to jump in late.
   
   We got also hit by the issue above and I gave it a quick try to check if our scenario is really solved with the upcoming 3.0.0 of deploy plugin.
   I created a very simple jar project with a hello world class and a accompanying bill of materials which should be additionally uploaded using deploy-file goal.
   
   The pom attaches sources and javadoc jar, executes "default-deploy" to upload the "hello world" jar and also executes a deploy-file to upload the corresponding bom.
   The "deploy-bom" still uploads sources and javadoc jar again, even with 3.0.0-SNAPSHOT.
   
   Let me just attach the relevant plugin configurations. If more information is required or if I should create a new issue just let me know.
   
   ```xml
   <!-- Attach sources and javadoc -->
   <plugin>
   	<artifactId>maven-javadoc-plugin</artifactId>
   	<version>2.10.4</version>
   	<executions>
   		<execution>
   			<id>attach-javadocs</id>
   			<goals>
   				<goal>jar</goal>
   			</goals>
   		</execution>
   	</executions>
   </plugin>
   <plugin>
   	<artifactId>maven-source-plugin</artifactId>
   	<version>3.0.0</version>
   	<executions>
   		<execution>
   			<id>attach-sources</id>
   			<goals>
   				<goal>jar</goal>
   			</goals>
   		</execution>
   	</executions>
   </plugin>
   
   <!-- upload bom with the jar -->
   <plugin>
   	<artifactId>maven-deploy-plugin</artifactId>
   	<version>3.0.0-SNAPSHOT</version>
   	<configuration>
   		<url>${project.distributionManagementArtifactRepository.url}</url>
   		<repositoryId>${project.distributionManagementArtifactRepository.id}</repositoryId>
   	</configuration>
   	<executions>
   		<execution>
   			<id>deploy-bom</id>
   			<phase>deploy</phase>
   			<goals>
   				<goal>deploy-file</goal>
   			</goals>
   			<configuration>
   				<file>${project.basedir}/bom/pom.xml</file>
   				<pomFile>${project.basedir}/bom/pom.xml</pomFile>
   			</configuration>
   		</execution>
   	</executions>
   </plugin>
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516376

   **[Stephan Leicht Vogt](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sleicht)** commented
   
   Great, it works! Thank you very much.
   BUILD SUCCESS: https://hudson.eclipse.org/scout/job/org.eclipse.scout.sdk.dependencies/27/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516329

   **[Karl Heinz Marbaise](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=khmarbaise)** commented
   
   Can you provide a full example project which shows the behaviour ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MDEPLOY-202] deploy-file goal insists on deploying source file for previous deploy-file execution [maven-deploy-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #222:
URL: https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516364

   **[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
   
   maven-plugins:28 has been released, so the SNAPSHOT has been removed. I've updated the pom of the maven-deploy-plugin.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org