[ https://issues.apache.org/jira/browse/MDEP-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MDEP-405. ------------------------------- Resolution: Auto Closed This issue has been auto closed because it has been inactive for a long period of time. If you think this issue still applies, retest your problem with the most recent version of Maven and the affected component, reopen and post your results. > purge-local-repository on multi-module project results in failure > ----------------------------------------------------------------- > > Key: MDEP-405 > URL: https://issues.apache.org/jira/browse/MDEP-405 > Project: Maven Dependency Plugin > Issue Type: Bug > Components: purge-local-repository > Affects Versions: 2.6 > Reporter: Stephen Cooper > Priority: Major > > I have several multi-module projects all suffering from this issue. > As a post-build step in jenkins, we want to clean up the repository to keep > disk space usage to a minimum. > We execute the following: > {code} > mvn -f pom.xml -DsnapshotsOnly=false -DreResolve=false -Dverbose=true -e > -Dmaven.repo.local=/var/lib/jenkins/maven-repositories/12 > dependency:purge-local-repository > {code} > We have reresolve set to false so that the files don't get downloaded again. > This works fine for the first modules, but once we hit a module which has the > same dependencies as a previous module, we get an error that we cannot > resolve dependencies and the build fails. > {code} > [INFO] Building ften-rewind-1.0.2-SNAPSHOT 1.0.2-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-dependency-plugin:2.6:purge-local-repository (default-cli) @ > ften-rewind --- > [INFO] Unable to resolve all dependencies for : > com.ften.stream:ften-rewind:1.0.2-SNAPSHOT. Falling back to non-transitive > mode for initial artifact resolution. > [INFO] Purging dependencies for project: > com.ften.stream:ften-rewind:jar:1.0.2-SNAPSHOT > [INFO] Purging artifact: com.googlecode.jmockit:jmockit:jar:1.1 > [INFO] Deleting: > /var/lib/jenkins/maven-repositories/12/com/googlecode/jmockit/jmockit/1.1 > [WARNING] Unable to purge local repository location: > /var/lib/jenkins/maven-repositories/12/com/googlecode/jmockit/jmockit/1.1 > [INFO] Purging artifact: junit:junit:jar:4.11 > [INFO] Deleting: /var/lib/jenkins/maven-repositories/12/junit/junit/4.11 > [WARNING] Unable to purge local repository location: > /var/lib/jenkins/maven-repositories/12/junit/junit/4.11 > [INFO] Purging artifact: genium.common:risk-ring-framework:jar:1.0.2 > [INFO] Deleting: > /var/lib/jenkins/maven-repositories/12/genium/common/risk-ring-framework/1.0.2 > [WARNING] Unable to purge local repository location: > /var/lib/jenkins/maven-repositories/12/genium/common/risk-ring-framework/1.0.2 > [INFO] Purging artifact: genium.common:imb:jar:2.0.48 > [INFO] Deleting: > /var/lib/jenkins/maven-repositories/12/genium/common/imb/2.0.48 > [WARNING] Unable to purge local repository location: > /var/lib/jenkins/maven-repositories/12/genium/common/imb/2.0.48 > [INFO] Purging artifact: genium.common:framework-base:jar:1.2.5 > [INFO] Deleting: > /var/lib/jenkins/maven-repositories/12/genium/common/framework-base/1.2.5 > [WARNING] Unable to purge local repository location: > /var/lib/jenkins/maven-repositories/12/genium/common/framework-base/1.2.5 > [INFO] Purging artifact: amt:amt:jar:3.15.2 > [INFO] Deleting: /var/lib/jenkins/maven-repositories/12/amt/amt/3.15.2 > [WARNING] Unable to purge local repository location: > /var/lib/jenkins/maven-repositories/12/amt/amt/3.15.2 > [INFO] > > [INFO] > ------------------------------------------------------------------------ > [INFO] Building ften-appmind-base 1.0.2-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-dependency-plugin:2.6:purge-local-repository (default-cli) @ > ften-appmind-base --- > Downloading: > http://nexus.carteret.ften.com//content/groups/public/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar > Downloaded: > http://nexus.carteret.ften.com//content/groups/public/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar > (38 KB at 1687.5 KB/sec) > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] risk-ring-applications-1.0.2-SNAPSHOT ............. SUCCESS [4.565s] > [INFO] ften-sequencer-1.0.2-SNAPSHOT ..................... SUCCESS [4.587s] > [INFO] sample-application-1.0.1-SNAPSHOT ................. SUCCESS [0.012s] > [INFO] ften-rewind-1.0.2-SNAPSHOT ........................ SUCCESS [0.009s] > [INFO] ften-appmind-base ................................. FAILURE [0.183s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 10.682s > [INFO] Finished at: Mon Apr 01 17:59:54 EDT 2013 > [INFO] Final Memory: 16M/682M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-dependency-plugin:2.6:purge-local-repository > (default-cli) on project ften-appmind-base: Execution default-cli of goal > org.apache.maven.plugins:maven-dependency-plugin:2.6:purge-local-repository > failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.6 or one of > its dependencies could not be resolved: The following artifacts could not be > resolved: commons-beanutils:commons-beanutils:jar:1.7.0, asm:asm:jar:3.3.1, > commons-collections:commons-collections:jar:3.2.1: Could not find artifact > commons-beanutils:commons-beanutils:jar:1.7.0 -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal > org.apache.maven.plugins:maven-dependency-plugin:2.6:purge-local-repository > (default-cli) on project ften-appmind-base: Execution default-cli of goal > org.apache.maven.plugins:maven-dependency-plugin:2.6:purge-local-repository > failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.6 or one of > its dependencies could not be resolved: The following artifacts could not be > resolved: commons-beanutils:commons-beanutils:jar:1.7.0, asm:asm:jar:3.3.1, > commons-collections:commons-collections:jar:3.2.1: Could not find artifact > commons-beanutils:commons-beanutils:jar:1.7.0 > {code} > I think that dependencies which have already been removed shouldn't cause the > purge-local-repository goal to fail. -- This message was sent by Atlassian JIRA (v7.6.3#76005)