Could not resolve dependencies for project com.xxxjar:-SNAPSHOT: Failed to collect dependencies for
Tech-Today

Could not resolve dependencies for project com.xxxjar:-SNAPSHOT: Failed to collect dependencies for


I just have this weird problem using maven + artifactory. I have a project which I first build using maven-compiler 2.3.2, and maven2. It build successfully and I was able to deploy in artifatory 2.5.

Eventually I've added several modules and one requires the use of maven-compiler-plugin 2.4, which also requires me to install maven3, because I'm having several errors otherwise. So my app is working again.

But when I checkout on a new machine and maven compiles, I got the ff error:
Could not resolve dependencies for project com.xxxjar:0.0.1-SNAPSHOT: Failed to collect depend
encies for . Failure to find in was cached in the local repository, resolution will not be reattempted until the update interval of has elapsed or updates are forced.
What's weird is that when I carry over, my m2 directory from the first machine where I have first develop with maven2, it compiles without error. So clearly some setting or jar is being missed by maven3?

Additional info: When I run install in another machine I have:
2012-05-25 17:21:32,316 [pool-1-thread-3] [WARN ] (o.a.e.DownloadServiceImpl:343) - Sending HTTP error code 409: The repository 'xx-repo-release' rejected the artifact 'xx-repo-release:com/xx/xx/0.0.1-SNAPSHOT/xx-0.0.1-SNAPSHOT.pom' due to its snapshot/release handling policy..
2012-05-25 17:21:32,342 [pool-1-thread-13] [WARN ] (o.a.e.DownloadServiceImpl:343) - Sending HTTP error code 409: The repository 'xx-repo-release' rejected the artifact 'xx-repo-release:com/xx/xx/0.0.1-SNAPSHOT/xx-0.0.1-SNAPSHOT.pom' due to its snapshot/release handling policy..
2012-05-25 17:21:32,350 [pool-1-thread-7] [WARN ] (o.a.e.DownloadServiceImpl:343) - Sending HTTP error code 409: The repository 'libs-release-local' rejected the artifact 'libs-release-local:com/xx/xx/0.0.1-SNAPSHOT/xx-0.0.1-SNAPSHOT.pom' due to its snapshot/release handling policy..


There are 2 root causes of these problem:
1.) mvn3 doesn't support non-unique repository. So you need to set your snapshot repository in artifactory to Unique.
2.) You need to deploy the parent project for your dependency, even if it's just a pom (this was my problem, I was only able to deploy the dependency project). For example you have:
+ParentProjectXXX
++DependencyA
++DependencyB

Let's assume that DependencyB, are your model classes and you wanted to use it in another project, let's say ParentProjectYYY (so you add it as a dependency). Of course, the project would build on the same machine where you mvn install ParentProjectXXX, because it has access to it. But when you compile ParentProjectYYY on another machine it will be able to download DependencyB, but not ParentProjectXXX (pom type) because I haven't deployed it, so it will cause a problem with your maven problem.

The solution is simple, issue the mvn deploy command from the parent project. So all modules, dependencies of that project are deployed to artifactory (remote repository).




- How To Setup Your Google Code Repository To Be Accessible In Maven
This tutorial will teach us how we can setup a google code project, so we can make the artifact accessible via maven. Requirements: 1.) You should have an account in google code. The trick is just simply forming the correct url to be access by maven....

- How To Invoke A Jenkins Build From Assembla On Git Push
This tutorial will try to configure a jenkins job to run when a git push is done on Assembla. This tutorial assumes that your server is running in Ubuntu 12.04.2. Requirements: You must have an assembla account with admin privilege.An external server...

- Deploy A Javaee6 War In Tomcat7 Using Maven
Recently, I'm trying to deploy a simple web application (war) in tomcat7 but it seems the old maven way of deploying a war will not work on it. The plugin I used to use for tomcat6 is: <plugin> <groupId>org.codehaus.mojo</groupId>...

- Maven Return Code Is: 401, Reasonphrase:user Anonymous Is Not Permitted To Deploy
If you ever encounter the error stated about when performing maven deploy, it means you did not specify your repository's account for validation when you invoke maven deploy. Or settings.xml is not set inside your .m2 directory. To do so follow this...

- How To Add Pmd Reporting To Maven
Before proceeding to this exercise, you may want to try my tutorial on how to setup a maven project to eclipse: http://czetsuya-tech.blogspot.com/2012/04/how-to-create-modularized-maven-project.html. Assuming you have follow the tutorial above, you should...



Tech-Today








.