Reputation: 1165
We use Maven3.0.3 and we use classifier to resolve among dependency for three regions DEV/TEST/PROD. Even though the Nexus maven rep has got the jars with all classifiers(DEV/TEST/PROD) it doesn't always get resolved. We had to build the specific classifier dependencies everytime to get it resolved.
Is there any workaround for this ?
Upvotes: 1
Views: 2157
Reputation: 31
Assuming your dependencies are snapshots, the problem may be the same as what I was seeing: that the snapshot resolves to the latest found in the repository, and it looks for your classifier within that build. So if a different classifier from the one you're looking for was the last to be built, dependency resolution fails. This would seem to be a bug in how Maven is doing its resolution, which appears to have been fixed in Maven 3.0.4 (my only other Maven install is 2.2.x so I can't say for certain whether this is broken in 3.0.3 still).
Also, it could be that you're using a version of say the dependency plugin which still has this problem. Make sure you don't have it pegged to something old.
Upvotes: 3
Reputation: 49361
Try to
-X
to produce debug output that may help (see mvn -help
). If the artifacts are there but are skipped there must be a reason. Try to find it in the debug outputs.-X
to force an update of your dependencies.Upvotes: 1