JoseHdez_2 JoseHdez_2 - 5 months ago 96
Java Question

"The POM for ... is missing, no dependency information available" even though it exists in Maven Repository

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.


    • When I
      install
      or
      compile
      it seems to ignore it.


  • Running
    mvn -U
    .


    • Same as with
      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.


Answer Source

Read the message again :

The POM for org.raml:jaxrs-code-generator:jar:2.0.0 is missing, no dependency information available

The problem is not the jar, but the pom.xml that is missing.
The pom.xml lists the required dependencies for this jar, that Maven will pull.
So, you really need it.

You can download the pom.xml from the Maven mule repository :

https://repository.mulesoft.org/nexus/content/repositories/releases/org/raml/jaxrs-code-generator/2.0.0/

Or better yet, add the Maven mule repository in your project.
And if you want it to be available for all projects, you can also add it in your settings.xml :

 <profile> 
   <repositories>
    ...
    <repository>
      <id>mulesoft-releases</id>
      <name>MuleSoft Repository</name>
      <url>http://repository.mulesoft.org/releases/</url>
      <layout>default</layout>
    </repository>
    <repository>
      <id>mulesoft-snapshots</id>
      <name>MuleSoft Snapshot Repository</name>
      <url>http://repository.mulesoft.org/snapshots/</url>
      <layout>default</layout>
    </repository>
     ...
  </repositories>     
</profile>

The Mule website documents it.