Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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.

like image 660
JoseHdez_2 Avatar asked Aug 17 '17 08:08

JoseHdez_2


People also ask

Is missing no dependency information available maven?

0 is missing, no dependency information available Error You Just need to add external Repository to your pom. since this is using Mulsoft-Release repository not Maven Central . Second solution is Just delete _remote. repositories file in your local repo, where this artifact resides.

How do I add dependency to Pom?

Open pom. xml in STS editor, click "Dependencies" tab at bottom 2. Click "Add" in Dependencies group 3. Copy/paste "Maven" tab dependency info from browser window (groupId, artifactId, version) into corresponding fields in "Select Dependency" popup in STS 4.


1 Answers

Read carefully the warning message :

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 during the build and overall the packaging of your application. So, you may really need it.

Note that this problem may of course occur for other Maven dependencies and the ideas to solve that is always the same.

The Mule website documents very well that in addition to some information related to.


How to solve ?

1) Quick workaround : looking for in the internet the pom.xml of the artifact

Googling the artifact id, the group id and its version gives generally interesting results : maven repository links to download it.
In the case of the org.raml:jaxrs-code-generator:jar:2.0.0 dependency, 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/

2) Clean workaround for a single Maven project : adding the repository declaration in your pom.

In your case, add the Maven mule repositories :

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelVersion>4.0.0</modelVersion>     ...     <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>     ... </project> 

3) Clean workaround for any Maven projects : add the repository declaration 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> 

Note that in some rare cases, the pom.xml declaring the dependencies is nowhere. So, you have to identify yourself whether the artifact requires dependencies.

like image 71
davidxxx Avatar answered Oct 13 '22 00:10

davidxxx