m2eclipse表示“Missing artifact”但我可以从cmdline构建! [英] m2eclipse says "Missing artifact" but I can build from cmdline!

查看:109
本文介绍了m2eclipse表示“Missing artifact”但我可以从cmdline构建!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用这个Sonatype Eclipse插件来处理一个现有的(巨大的)软件,我可以使用maven从命令行构建。

I'm trying to use this Sonatype Eclipse plugin for the first time to handle an existing (huge) software that I can build with maven form the command line.

我已配置插件使用我的maven 2.2.1安装而不是内置的Maven 3。

I have configured the plugin to use my maven 2.2.1 installation instead of the built-in Maven 3.

在Eclipse中,我有25个项目(通过根pom加载.xml),其中4个有编译错误; maven控制台包含很多这样的行:

In Eclipse I have 25 projects (loaded through the root pom.xml) and 4 of them have compilation errors; the maven console contains a lot of lines like this one:

缺少的工件commons-logging:commons-logging:jar:1.0.4:compile

Missing artifact commons-logging:commons-logging:jar:1.0.4:compile

我有我的存储库中的所有jar,并且M2_REPO类路径变量正确定义。为什么插件看不到所有的jar?

I have all the jars in my repository and the M2_REPO classpath variable correctly defined. Why the plugin doesn't see all the jars?

这些项目的.classpath文件只是引用MAVEN2_CLASSPATH_CONTAINER,没有jar列表。
Eclipse中的pom.xml会在缺少的jar的第一行显示错误,但是我可以从命令行中生成!

The .classpath file of those projects simply references "MAVEN2_CLASSPATH_CONTAINER", there isn't a list of the jars. The pom.xml in Eclipse shows an error on the first line for the missing jars but I can build from the command line!

任何想法?我需要帮助!如果我不解决这个问题,我会尝试转到NetBeans。

Any idea? I need help! I will try to move to NetBeans if I don't solve this problem.

谢谢。

推荐答案

我终于找到了解决方法。这是m2eclipse中的一个错误,但是当我在 quartz-1.6.0.jar旁边添加 quartz-1.6.0.pom 时,问题消失了 .m2\repository\opensymphony\quartz\1.6.0\

pom不是目前在 http://repo1.maven.org/maven2/opensymphony/quartz/ 1.6.0 / ,但您可以从 quartz-1.6.0-bundle.jar linket从 http://jira.opensymphony.com/browse/QUARTZ-482

这是一个奇怪的解决方案,但它在我的同事的电脑也是。

I finally found a workaround. It is surely a bug in m2eclipse, however the problem disappeared when I added quartz-1.6.0.pom next to quartz-1.6.0.jar in .m2\repository\opensymphony\quartz\1.6.0\
The pom is not present at http://repo1.maven.org/maven2/opensymphony/quartz/1.6.0/ but you can extract it from quartz-1.6.0-bundle.jar linket at http://jira.opensymphony.com/browse/QUARTZ-482
It's a strange solution but it worked on the PCs of my collegues too.

这篇关于m2eclipse表示“Missing artifact”但我可以从cmdline构建!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆