Problem:
A dependency will not download even though I copied it from the Maven Repository.
When I hover over the dependency in Eclipse, it warns: "Maven Missing artifact org.raml:jaxrs-code-generator:jar:2.0.0
".
When I try mvn install
or mvn compile
it warns: "[WARNING] The POM for org.raml:jaxrs-code-generator:jar:2.0.0 is missing, no dependency information available
".
Tried:
Downloading the jar into the ~/.m2/repository/org/raml/jaxrs-code-generator/2.0.0
folder, then refreshing in the editor.
install
or compile
it seems to ignore it.Running mvn -U
.
install
or compile
.In-depth:
<dependency>
<groupId>org.raml</groupId>
<artifactId>jaxrs-code-generator</artifactId>
<version>2.0.0</version>
</dependency>
The dependency exists in the Maven Repository (the version is also correct).
Using Eclipse EE Neon 4.6.3, Apache Maven 3.3.9, Java 1.8.0_121.
I have no settings.xml
in the ~/.m2
folder.
I don't use any other repositories, local or otherwise.
In my case the reason was since the remote repo artifact (non-central) had dependencies from the Maven Central in the .pom
file, and the older version of mvn
(older than 3.6.0) was used. So, it tried to check the Maven Central artifacts mentioned in the remote repo's .pom
for the specific artifact I've added to my dependencies and faced the Maven Central http access issue behind the scenes (I believe the same as described there: Maven dependencies are failing with a 501 error - that is about using https access to Maven Central by default and prohibiting the http access).
Using more recent Maven (from 3.1 to 3.6.0) made it use https to check Maven Central repo dependencies mentioned in the .pom
files of the remote repositories and I no longer face the issue.
This is my solution, may be it can helps I use IntelliJ IDE. File -> Setting -> Maven -> Importing change JDK for importer to 1.8( you can change to lower, higher)
In my case I was using Jade and I was using HTTP repository URL. Changing the Url to HTTPS worked for me.
If the POM missing warning is of project's self module, the reason is that you are trying to mistakenly build from a sub-module directory. You need to run the build and install command from root directory of the project.
I had a similar problem quite recently. In my case:
I downloaded an artifact from some less popular Maven repo
This repo dissappeared over this year
Now builds fail, even if I have this artifact and its pom.xml in my local repo
Workaround:
delete _remote.repositories file in your local repo, where this artifact resides. Now the project builds.
You will need to add external Repository to your pom, since this is using Mulsoft-Release
repository not Maven Central
<project>
...
<repositories>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
</repositories>
...
</project>
Source: Stackoverflow.com