Reputation: 3358
I am getting this:
Failed to execute goal on project boot: Could not resolve dependencies for project xxx:boot:jar:1.0.0-SNAPSHOT: Could not find artifact xxx:xxx:jar:1.0.0-SNAPSHOT in central (http://xxx/artifactory/all/) -> [Help 1]
That arifact is ONLY in my local repo. (Yes I can see it there) Maven is not picking up.
I see alot of ideas on SO but none of them have worked.
I have tried all of the sugestions on SO:
find ~/.m2/repository -name _maven.repositories -exec rm -v {} \;
find ~/.m2/repository -name _remote.repositories -exec rm -v {} \;
I deleted the repo and re-built (ie. mvn install) all the needed dependencies.
I added
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
to the POM
I tried mvn -o install
I am not sure what to try next! I am using mvn 3.3.9 on Ubuntu 16.04
Upvotes: 5
Views: 6791
Reputation: 422
for me , it was a multimodule maven project and the parent module's version didn't match the versions of the child modules. And so apprently the project didn't install well
Upvotes: 0
Reputation: 832
If you are trying to run a maven build for a child project which is dependent on another parallel level child project. Just run a maven build on the parent project once.It resolved the issue for me.
Upvotes: 0
Reputation: 3943
Make sure that localRepository
tag in your settings.xml
actually points to the m2 repository location on your machine. You will find settings.xml in %M2_HOME%/conf
directory
Upvotes: 0
Reputation: 4818
Given your information, I would say you might have to run the full command (especially for jars built before the 2.5 version of Maven), which should be (replace with what's convenient): mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
See: https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
Upvotes: 1