Hi, Using Maven 2.2.1, I deployed (with deploy:deploy-file through command-line) several artifacts with same version (SNAPSHOT), same artifactId and groupId, but different types.
Here is the list I get in my nexus storage: myArtifact-1.0-20120106.101541-1.ear myArtifact-1.0-20120106.101541-1.ear.md5 myArtifact-1.0-20120106.101541-1.ear.sha1 myArtifact-1.0-20120106.101541-1.pom myArtifact-1.0-20120106.101541-1.pom.md5 myArtifact-1.0-20120106.101541-1.pom.sha1 myArtifact-1.0-20120106.101603-2.jar myArtifact-1.0-20120106.101603-2.jar.md5 myArtifact-1.0-20120106.101603-2.jar.sha1 myArtifact-1.0-20120106.101603-2.pom myArtifact-1.0-20120106.101603-2.pom.md5 myArtifact-1.0-20120106.101603-2.pom.sha1 myArtifact-1.0-20120106.101622-3.pom myArtifact-1.0-20120106.101622-3.pom.md5 myArtifact-1.0-20120106.101622-3.pom.sha1 myArtifact-1.0-20120106.101622-3.war myArtifact-1.0-20120106.101622-3.war.md5 myArtifact-1.0-20120106.101622-3.war.sha1 maven-metadata.xml maven-metadata.xml.md5 maven-metadata.xml.sha1 The problem now is that if I add the following dependency to a module pom : <dependency> <groupId>myGroup</groupId> <artifactId>myArtifact</artifactId> <version>1.0-SNAPSHOT</version> <type>ear</type> </dependency> ... build fails with following error : [INFO] snapshot myGroup:myArtifact:1.0-SNAPSHOT: checking for updates from MYREPO Downloading: http://host/nexus/content/repositories/MYREPO//myGroup/myArtifact/1.0-SNAPSHOT/myArtifact-1.0-20120106.101622-3.pom 471b downloaded (myArtifact-1.0-20120106.101622-3.pom) Downloading: http://host/nexus/content/repositories/MYREPO//myGroup/myArtifact/1.0-SNAPSHOT/myArtifact-1.0-20120106.101622-3.ear [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. What happens is that maven, for this artifact, gets "timestamp-3" as last snapshot version (for the pom), and then tries to retrieve the ear with this same version with "timestamp-3", and in our case, it does not exist. If I only leave the "timestamp-1" pom, and rename the war so it has same version (timestamp-1), then it works and maven is able to download 1.0-SNAPSHOT of both ear or war. I tried "generatePom=false" for second deploy command but result was the same - except that only 1 pom was generated of course. I should I have deployed the war and ear in first place to avoid this issue ? Thanks, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Deploying-snapshots-of-same-artifactId-but-different-types-tp5432928p5432928.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
