I\'m new to maven so there must be something I don\'t understand. But, I\'ve added multiple repositories to resolve multiple dependencies in my POM file. For some reason i
Just got this problem: log4j version 1.2.15 is causing this problem. Using log4j version 1.12.16 removes this problem. see Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1
I think download jmx1.2.1 will help you :-), try upload it to your nexus
It looks like you are running Maven 3+ and you are trying to access a legacy repository.
One annoying but well documented change for Maven 3 was removing support for legacy repositories. You can check out this compatibility note and others here
If you are not depending completely on Maven 3 you can reduce to Maven 2.2.1 and this legacy issue should go away or follow what the link says and create a
Maven 2.x compatible view of the legacy repository
You should use 2 repository like bellow:
<repositories>
<repository>
<id>repository.jboss.org-public</id>
<name>JBoss repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public</url>
</repository>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org</url>
</repository>
</repositories>
I found two solution for the problem , both are equally effective .
Download jar and install locally
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
2 . Exclusion of dependencies
`<dependency> .... <exclusions> <exclusion> <groupId> ... <artifactId>...</exclusion>`
maven dependency exclusions
I may be a little late to the party, but someone using log4j 1.2.15 may search for it in the future. The problem is resolved with this:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
</exclusions>
</dependency>