【问题标题】:Missing Maven2 artifacts in fresh Eclipse install全新 Eclipse 安装中缺少 Maven2 工件
【发布时间】:2011-10-17 01:12:35
【问题描述】:

我刚刚安装了 SpringSource Toolssuite 2.7.1 的新副本并尝试从 SVN 导入一个工作项目,当我尝试构建它时,我收到以下错误:

31/07/11 17:15:04 ART: Missing artifact taglibs:standard:jar:1.1.2:compile
31/07/11 17:15:04 ART: Missing artifact cglib:cglib:jar:2.1_3:compile
31/07/11 17:15:04 ART: Missing artifact org.springframework:spring-context:jar:3.0.5.RELEASE:compile
31/07/11 17:15:04 ART: Missing artifact org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
31/07/11 17:15:04 ART: Missing artifact org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
31/07/11 17:15:04 ART: Missing artifact org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
...
31/07/11 17:15:04 ART: Maven Builder: FULL_BUILD requireFullBuild
31/07/11 17:15:04 ART: [WARN] 
31/07/11 17:15:04 ART: [WARN] Some problems were encountered while building the effective model for com.asd:si:war:1.0.0-BUILD-SNAPSHOT
31/07/11 17:15:04 ART: [WARN] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 312, column 12
31/07/11 17:15:04 ART: [WARN] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 373, column 12
31/07/11 17:15:04 ART: [WARN] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 320, column 12
31/07/11 17:15:04 ART: [WARN] 
31/07/11 17:15:04 ART: [WARN] It is highly recommended to fix these problems because they threaten the stability of your build.
31/07/11 17:15:04 ART: [WARN] 
31/07/11 17:15:04 ART: [WARN] For this reason, future Maven versions might no longer support building such malformed projects.
31/07/11 17:15:04 ART: [WARN] 

在我的 pom.xml 中,所有依赖项都配置好了,这个项目在其他安装中也可以正常工作...

有什么想法吗?谢谢

【问题讨论】:

  • 其他安装是什么意思?这些其他安装是否在不同的机器上?
  • 请注意:如果使用 sts 2.7.1 附带的嵌入式 maven,则 maven 是版本 3。检查您的 settings.xml 是否与其他安装中安装的相同。
  • @mkro:你说得对,在其他机器上。
  • @guido: 好点,我去看看!
  • 错误在哪里?在使用 maven3 运行 maven2 pom 时,我只看到正常的警告。 maven3 需要明确指定插件版本

标签: eclipse maven-2 maven sts-springsourcetoolsuite


【解决方案1】:

确保您在 m2eclipse 插件中配置了外部 Maven 安装。转到 Window -> Preferences -> Maven -> Installation 并在那里配置它。 另外,请注意,Indigo 附带的 Maven 插件不能像以前的版本一样工作,并且可能不直接支持某些 Maven 插件。 此外,如果您以前没有使用过 Maven 3,并且您的 POM 中编码了插件版本号,则可能存在不兼容性,因为并非所有与 Maven 2 一起使用的插件也可以与 Maven 3 一起使用。不过,所有人都应该有更新。请注意,指定插件版本号是一个好习惯,如果您不这样做,Maven 3 会警告您。如果您还没有这样做,请尝试从命令行使用 Maven 3 构建您的项目,以更准确地了解问题所在。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-11
    • 2011-08-31
    • 1970-01-01
    • 1970-01-01
    • 2013-06-09
    • 2015-11-07
    • 2014-07-26
    • 1970-01-01
    相关资源
    最近更新 更多