[英]Why are some jars not added to .classpath file in eclipse by maven?
I would like to add the following dependency to a maven (I'm not using the m2e plugin). 我想将以下依赖项添加到Maven中(我不使用m2e插件)。
<dependency>
<groupId>uk.com.robust-it</groupId>
<artifactId>cloning</artifactId>
<version>1.9.0</version>
</dependency>
The problem is that the jar simply is not added to the .classpath file in eclipse when I execute mvn eclipse:clean eclipse:eclipse
. 问题是当我执行
mvn eclipse:clean eclipse:eclipse
时,jar根本不会添加到eclipse中的.classpath文件中。 It works fine for this dependency. 对于这种依赖关系,它工作正常。
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.5</version>
</dependency>
Maven does donwload cloning the dependency. Maven不会下载克隆依赖项。 The correct .jar file is in
~/.m2/repositories
. 正确的.jar文件在
~/.m2/repositories
。 I also tried mvn eclipse:configure-workspace
before executing mvn eclipse:clean eclipse:eclipse
. 在执行
mvn eclipse:clean eclipse:eclipse
之前,我还尝试了mvn eclipse:configure-workspace
。 Didn't help either. 也没有帮助。 Running
mvn clean compile test integration-test
works fine, even if I add imports to classes in cloning. 即使我在克隆中将导入添加到类中,运行
mvn clean compile test integration-test
可以正常工作。
Any help is greatly appreciated! 任何帮助是极大的赞赏!
Try a 尝试一个
mvn help:effective-pom
to see if the scope
is provided
看看是否
provided
了scope
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.