[ 
https://issues.apache.org/jira/browse/MDEP-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Heinz Marbaise updated MDEP-290:
-------------------------------------
    Fix Version/s: waiting-for-feedback

> purge-local-repository fails when the dependency was never download yet and 
> copying is declared
> -----------------------------------------------------------------------------------------------
>
>                 Key: MDEP-290
>                 URL: https://issues.apache.org/jira/browse/MDEP-290
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: purge-local-repository
>    Affects Versions: 2.1
>            Reporter: Dieter König
>             Fix For: waiting-for-feedback
>
>
> 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:
> {code: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>
> {code}
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to