Wednesday, July 31, 2013

Maven unable to find resource in repository

Lot of similar errors for packages I know we have in our internal repository:
[INFO] Unable to find resource 'com.octo.captcha:jcaptcha-api:jar:2.0-alpha-1' in repository central (http://repo1.maven.org/maven2)
However in ~/.m2/settings.xml I have specified the internal repo as central mirroring absolutely everything. The "mvn -X" command wouldn't say which settings.xml it was parsing. What to do?

The solution was to specify where the settings were (a one time shot):
$ mvn install --settings ~/.m2/settings.xml

No comments:

Followers