[ https://jira.codehaus.org/browse/MDEP-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier updated MDEP-290: --------------------------- Fix Version/s: 2.6 Assignee: Paul Gier (was: Brian Fox) > purge-local-repository fails when the dependency was never download yet and > copying is declared > ----------------------------------------------------------------------------------------------- > > Key: MDEP-290 > URL: https://jira.codehaus.org/browse/MDEP-290 > Project: Maven 2.x Dependency Plugin > Issue Type: Bug > Components: purge-local-repository > Affects Versions: 2.1 > Reporter: Dieter König > Assignee: Paul Gier > Fix For: 2.6 > > > Using goal "purge-local-repository" together with "copy-dependencies" leads > to failure of build with "dependency is missing" if one of the declared > snapshot-dependencies was never downloaded before. > Example, pom.xml: > ... > <dependencies> > <dependency> > <groupId>some.groupid</groupId> > <artifactId>some.artifactid</artifactId> > <version>1.0-SNAPSHOT</version> > </dependency> > </dependencies> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-dependency-plugin</artifactId> > <version>2.1</version> > <executions> > <execution> > <id>clean-local-repository</id> > <phase>prepare-package</phase> > <goals> > <goal>purge-local-repository</goal> > </goals> > <configuration> > <reResolve>false</reResolve> > <verbose>true</verbose> > </configuration> > </execution> > <execution> > <id>copy-artifact</id> > <phase>package</phase> > <goals> > <goal>copy-dependencies</goal> > </goals> > <configuration> > > <includeArtifactIds>some.artifactid</includeArtifactIds> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > ... > In the local maven repository the folder "some.artifactid" should be missing > (just delete it manually if you are testing with something which you already > have there). Now try to build the project with the given pom. It will fail > with the message that dependency is missing. > If you comment out the execution of purge-local-repository the build will run > successfully (maven downloads the declared dependency). > Otherwise if you comment out the execution of copy-dependencies the build > will also run successfully. > But if you have both executions together declared it will fail as long as the > declared dependency is not in the local repository... -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira