Folks; I've run into this problem before, and have never been able to explain it.
We have a number of dependent sub-projects, and whenever I try to do a build from one of the sub-projects, somewhere down the dependency chain it switches away from the version I'm specifying with -Dbuild.version and back to SNAPSHOT, causing the build to fail. Here's some sample output: -------- 1:17pm prodi...@node179 /prodinfolocal/buildareas/squid/R2_5_653/salmon > mvn -PPROD -Dsquid.version=R2_5_653H1 -Dbuild.version=R2_5_653H1 -Dproject.version=R2_5_653H1 -Dmaven.test.skip=true install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Squid Salmon UI [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://prodinfosvn.broad.mit.edu:8000/m2-repository/Squid/SquidEntities/1.0-SNAPSHOT/SquidEntities-1.0-SNAPSHOT.pom Downloading: http://prodinfosvn.broad.mit.edu:8000/m2-repository/Squid/dbawrappers/1.0-SNAPSHOT/dbawrappers-1.0-SNAPSHOT.pom Downloading: http://prodinfosvn.broad.mit.edu:8000/m2-repository/jadm/jadm/1.0-SNAPSHOT/jadm-1.0-SNAPSHOT.pom Downloading: http://prodinfosvn.broad.mit.edu:8000/m2-repository/Squid/SquidEntities/1.0-SNAPSHOT/SquidEntities-1.0-SNAPSHOT.jar Downloading: http://prodinfosvn.broad.mit.edu:8000/m2-repository/jadm/jadm/1.0-SNAPSHOT/jadm-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) Squid:SquidEntities:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=Squid -DartifactId=SquidEntities -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=Squid -DartifactId=SquidEntities -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) Squid:salmon:jar:R2_5_653H1 2) Squid:common:jar:R2_5_653H1 3) Squid:SquidEntities:jar:1.0-SNAPSHOT 2) jadm:jadm:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=jadm -DartifactId=jadm -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=jadm -DartifactId=jadm -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) Squid:salmon:jar:R2_5_653H1 2) bettalims:bettalims:jar:R2_5_653H1 3) jadm:jadm:jar:1.0-SNAPSHOT ---------- 2 required artifacts are missing. for artifact: Squid:salmon:jar:R2_5_653H1 from the specified remote repositories: central (http://repo1.maven.org/maven2), codehaus (http://repository.codehaus.org/), sourceforge (http://repository.codehaus.org/), internal (http://prodinfosvn.broad.mit.edu:8000/m2-repository) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4 seconds [INFO] Finished at: Wed Dec 31 13:18:22 EST 2008 [INFO] Final Memory: 17M/244M [INFO] ------------------------------------------------------------------------ 9.185u 0.508s 0:05.51 175.6% 0+0k 0+0io 1pf+0w 1:18pm prodi...@node179 /prodinfolocal/buildareas/squid/R2_5_653/salmon > ------ Why does it all of a sudden switch from the version I want (R2_5_653H1) to SNAPSHOT here? Hers's the way the dependency is specified in this (salmon) subproject's POM: ---- <dependency> <groupId>Squid</groupId> <artifactId>common</artifactId> <version>${build.version}</version> </dependency> ---- and here's the dependency to the failing SquidEntities in the common POM: --- <dependency> <groupId>Squid</groupId> <artifactId>SquidEntities</artifactId> <version>${project.version}</version> </dependency> ---- I'd appreciate any clues, as I'm out of ideas. Thanks! -Chris -- Christopher Patti - Release Engineer - E-Mail: [email protected] Y! feoh AIM: chrisfeohpatti GTalk/Jabber: [email protected] Phone - Work: 617-324-2820 Cell: 617-710-1806 Home: 617-764-5887
