缺少的工件com.sun.jdmk:jmxtools:jar:1.2.1 [英] Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1
问题描述
log4j
通过搜索适当的对话。现在我的pom.xml看起来像 < project xmlns =http://maven.apache.org/POM/4.0 .0xmlns: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>
<依赖关系>
<依赖关系>
< groupId> junit< / groupId>
< artifactId> junit< / artifactId>
< scope> test< / scope>
< / dependency>
<依赖关系>
< groupId> log4j< / groupId>
< artifactId> log4j< / artifactId>
< version> 1.2.15< / version>
< / dependency>
< / dependencies>
< dependencyManagement>
<依赖关系>
<依赖关系>
< groupId> junit< / groupId>
< artifactId> junit< / artifactId>
< version> 3.8.1< / version>
< / dependency>
< / dependencies>
< / dependencyManagement>
< / project>
Eclipse说我的POM有很多问题,如
缺少的工件javax.jms:jms:jar:1.1 pom.xml / Test_Maven_03第2行Maven依赖关系问题
这是什么意思,以及如何查看自动的maven功能jar下载
编辑1
如果我选择log4j 1.2.16而不是1.2.15,我会收到另一个错误: Missing artifact log4j:log4j:bundle:1.2.16
。所以我看不到任何自动的jar管理。
如果我记得正确,它不会被包含在许可证问题上。如果您不需要jms功能,可以从log4j依赖关系中排除jms:
< dependency>
< groupId> log4j< / groupId>
< artifactId> log4j< / artifactId>
< version> 1.2.15< / version>
<排除>
< exclude>
< groupId> com.sun.jmx< / groupId>
< artifactId> jmxri< / artifactId>
< / exclusion>
< exclude>
< groupId> com.sun.jdmk< / groupId>
< artifactId> jmxtools< / artifactId>
< / exclusion>
< exclude>
< groupId> javax.jms< / groupId>
< artifactId> jms< / artifactId>
< / exclusion>
< / exclusions>
< / dependency>
I have created simple project from maven-achetype-quickstart under Eclipse Indigo, then I went to pom.xml gui editor and in dependencies tab added dependency log4j
by search in appropriate dialog. 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 have many 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 maven feature of automatic jar downloading.
EDIT 1
If I select log4j 1.2.16 instead of 1.2.15, I get another error: Missing artifact log4j:log4j:bundle:1.2.16
. So I see no automatic jar management at all.
It's not included anymore due to licensing issues if I remember correctly. If you don't need jms functionality you can exclude jms from 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>
这篇关于缺少的工件com.sun.jdmk:jmxtools:jar:1.2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!