tags:

views:

147

answers:

2

I've been trying to use Maven to build a project. The project builds fine on a few computers I tried but on one machine, I'm having a random issue.

Essentially, maven is searching for a dependency that is not included in the pom.xml file or the in the settings.xml file at all.

I have tried mvn dependency:purge-local-repository but still no avail; I'm still stuck at mvn searching for a dependency I have no idea where it's looking from.

+5  A: 
Rich Seller
A: 

Maven dependencies can have transitive dependencies (dependencies of dependencies), so even if something is not declared explicitly in the POM, Maven may still need to go find it.

Running mvn dependency:tree should help you diagnose the problem, as Rich Seller describes; it might also help you to run it on the other machines where you aren't having the problem and compare the output.

purge-local-repository isn't really going to help you much in this regard; all that that does is remove artifacts from your local repo in case one of them is corrupted. If maven is trying to get a dependency that isn't in the local repo, it won't really help matters much.

Ken Liu