Friday, July 22, 2011

Maven - org.safehaus.jug:jug:jar:asl:2.0.0-osgi Solution

After some struggle I was able to identify the solution for the error Failed to read artifact descriptor for org.safehaus.jug:jug:asl-2.0.0-osgi

These jars were available on the older version of the JBoss Repository and JBoss has stopped providing access to that URL. Hence your pom is unable to find these jars in the JBoss Repository.

To resolve this issue, we need to update the mirrors in maven's settings.xml file.

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository>C:/Vijay/Office/mvn_repo</localRepository>

    <pluginGroups>
        <pluginGroup>org.mule.tools</pluginGroup>
        <pluginGroup>org.jboss.maven.plugins</pluginGroup>
    </pluginGroups>

    <proxies>
    </proxies>

    <servers>
    </servers>

    <mirrors>
        <mirror>
            <id>jboss-public</id>
            <name>JBoss Public Nexus Repository</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <mirrorOf>jboss</mirrorOf>
        </mirror>
    </mirrors>

    <profiles>
    </profiles>

</settings>

With the above settings in place, open your Eclipse and go to Windows->Open View->Other->Maven Repositories

In Maven Repositories click on the Refresh button, it would load the new settings.xml to your Eclipse Configuration.

Once the settings are applied, clean your project using Maven Clean and this error should be gone now.

No comments:

Post a Comment