简体   繁体   中英

Maven deploy failing

I am running maven 3.0.4. I am able to successfully run clean,package,install. But when I run mvn deploy , I get an errror:

I am testing this small java module which has 4 projects : 1 parent P1 and 3 children C1,C2,C3. Now this parent P1 inherits from the master project M1 which is currently not uploaded in the repository. So the problem. When I try to build P1, it throws the error

  Non-resolvable parent POM: Failure to find .....:pom:1.0.0 in http://myserver.net.intra:9000
/nexus/content/repositories/public/ was cached in the local repository, resolution will not be 
reattempted until the update interval of releases has elapsed or updates are forced and 
'parent.relativePath' points at wrong local POM @ line 6, column 10 

Update :

mvn deploy:deploy-file is working and uploads the JAR successfully. But mvn deploy gives this :

   Failed to execute goal on project jurisdiction-business: Could not resolve dependencies for 
project com.a.b.c.d.-business:war:0.0.1-SNAPSHOT: Failure to find om.a.b.c.d.:jar:0.0.1-20121110.071100-3 
in http://myserver.net.intra:9000/nexus/content/repositories/public-snapshots as cached in the 
local repository, resolution will not be reattempted until the update interval of snapshots has 
elapsed or updates are forced

Normally in this situation you would have the projects checked out in a specific pattern beside each other and use the /project/parent/relativePath (XPath in the pom) to specify the path to the parent project when the parent is not in a repository.

Alternatively you could use an aggregator pom and build with the aggregator pom as that will allow the parent to be resolved from the reactor.

The simplest is to just run mvn install on M1 so that it can be resolved from the local cache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM