Missing artifact com.sun.jdmk: jmxtools: jar: 1.2.1

I created a simple project from maven-achetype-quickstart in Eclipse Indigo, then I went to the pom.xml gui editor and the log4j dependency was added to the dependency tab by searching in the corresponding dialog box. Now my pom.xml looks like

 <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-.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>mygroup</groupId> <artifactId>Test_Maven_03</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>Test_Maven_03</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.15</version> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> </dependency> </dependencies> </dependencyManagement> </project> 

Eclipse says my POM has a lot of problems like

Missing artifact javax.jms: jms: jar: 1.1 pom.xml / Test_Maven_03 line 2 Maven dependency problem

What does it mean and how to see the maven function to automatically load jar.

EDIT 1 If I choose log4j 1.2.16 instead of 1.2.15, I get another error: Missing artifact log4j:log4j:bundle:1.2.16 . Therefore, I do not see the automatic management of banks at all.

+44
java eclipse maven dependency-management
Jan 28 '12 at 19:34
source share
4 answers

It no longer turns on due to licensing issues, if I remember correctly. If you do not need the jms function, you can exclude jms from the log4j dependency:

 <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.15</version> <exclusions> <exclusion> <groupId>com.sun.jmx</groupId> <artifactId>jmxri</artifactId> </exclusion> <exclusion> <groupId>com.sun.jdmk</groupId> <artifactId>jmxtools</artifactId> </exclusion> <exclusion> <groupId>javax.jms</groupId> <artifactId>jms</artifactId> </exclusion> </exclusions> </dependency> 
+91
Jan 28 '12 at 19:36
source share

Change the version of log4j to 1.2.16.

The metadata for 1.2.15 is bad, as you discovered, because there are no dependencies in the central repository. However, there is a policy for changing artifacts or metadata in the maven central repository, as this may result in unique assemblies. That is, the assembly can behave differently if the artifact or its metadata has changed.

The reason is that working with bad metadata is better than creating irreproducible assemblies.

Better, of course, if project developers are more careful about the metadata that they upload to the central one.

+36
Jan 28 '12 at 19:51
source share

Use Log4J 1.2.16 (the one I linked to in the previous question) ; he does not have an older JMX dependency and gets it from Geronimo.

+11
Jan 28 '12 at 19:50
source share

The answers above (excluding JMX) are great if you don't need any JMX dependencies. However, you will never be able to download JMX dependency .jar files from the standard maven repository. To quote JΓΆrg Schaible-3 on nabble.com :

This is normal, and it will remain so because Sun / Oracle has never granted distribution rights for these artifacts as separate downloads. You will have to download them from Oracle, accept their license and add them to the local repository manager.

Therefore, if you want to use JMX, you will need to download the corresponding zmx zip folder from the Oracle website .

0
Sep 06 '17 at 15:11
source share



All Articles