Mike Percy created MNG-5383: ------------------------------- Summary: Maven will not install snapshots locally if it downloads snapshots from server in same build Key: MNG-5383 URL: https://jira.codehaus.org/browse/MNG-5383 Project: Maven 2 & 3 Issue Type: Bug Affects Versions: 3.0.3 Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800) Maven home: /usr/share/maven Java version: 1.6.0_37, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac" Reporter: Mike Percy
Seeing this issue in Maven 3.0.3 with Apache Flume 1.4.0-SNAPSHOT. We have a multi-module project and are pushing SNAPSHOT jars to our repo. We had to change some deps and the result is we ran into a situation where Maven would only install jars to the local repo (when running mvn install) if the SNAPSHOT jars did not need to be downloaded. It sounds strange but I tried several times with the same outcome. Details below: >From https://issues.apache.org/jira/browse/FLUME-1732 To reproduce: 1. Delete all flume jars from your local repo: rm -rf ~/.m2/repository/org/apache 2. Run install build: {noformat} mvn clean install {noformat} This build will fail with tests complaining about missing dependencies. Even though it says it is installing the locally built modules to the local repository, in reality the artifacts are not there. They are whatever was downloaded from upstream (several days old). So these lines of output are not accurate: {noformat} [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ flume-ng-sdk --- [INFO] Installing /Users/mpercy/src/flume.alt/flume-ng-sdk/target/flume-ng-sdk-1.4.0-SNAPSHOT.jar to /Users/mpercy/.m2/repository/org/apache/flume/flume-ng-sdk/1.4.0-SNAPSHOT/flume-ng-sdk-1.4.0-SNAPSHOT.jar [INFO] Installing /Users/mpercy/src/flume.alt/flume-ng-sdk/pom.xml to /Users/mpercy/.m2/repository/org/apache/flume/flume-ng-sdk/1.4.0-SNAPSHOT/flume-ng-sdk-1.4.0-SNAPSHOT.pom {noformat} because that .pom matches the old one that was downloaded from a few days ago (specifically, it does not contain the netty dependency which is in the local pom). Even weirder, if you simply execute the same command again, as in the above step, it will go through fine. 3. Run install build: {noformat} mvn clean install {noformat} Build success! As one might expect under normal circumstances, now the SNAPSHOT artifacts in the local repository are from the local build (the install message was not a lie). -- 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