在全新的Eclipse安装中缺少Maven2工件

时间:2011-07-31 20:20:56

标签: eclipse maven-2 maven sts-springsourcetoolsuite

我刚刚安装了SpringSource Toolsuite 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中,所有依赖项都配置好了,这个项目在其他安装中工作正常......

有什么想法吗?感谢

1 个答案:

答案 0 :(得分:2)

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