[ https://issues.apache.org/jira/browse/MDEPLOY-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346270#comment-15346270 ]
Matthias Hanisch edited comment on MDEPLOY-202 at 6/23/16 12:55 PM: -------------------------------------------------------------------- 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. {code: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> {code} was (Author: matze): 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. <!-- 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> > deploy-file goal insists on deploying source file for previous deploy-file > execution > ------------------------------------------------------------------------------------ > > Key: MDEPLOY-202 > URL: https://issues.apache.org/jira/browse/MDEPLOY-202 > Project: Maven Deploy Plugin > Issue Type: Sub-task > Components: deploy:deploy-file > Affects Versions: 2.8.1, 2.8.2 > Reporter: Stephan Leicht Vogt > Assignee: Robert Scholte > Fix For: 3.0.0 > > Attachments: MDEPLOY-202-DeployFileMojo.patch > > > 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: > {code: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> > {code} > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)