2011-07-31 23 views
0

我剛剛安裝了SpringSource工具包2.7.1的全新副本,並試圖從SVN,導入工作項目時,我嘗試建立它,我得到以下錯誤:新鮮Eclipse中缺少Maven2的文物安裝

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

其他裝置是什麼意思?這些其他安裝在不同的機器上嗎? – mkro

+0

請注意:如果使用隨sts 2.7.1提供的嵌入式maven,則maven爲版本3.檢查您的settings.xml是否與其他安裝中安裝的相同。 –

+0

@mkro:你是對的,在其他機器上。 –

回答

2

確保您在m2eclipse插件中配置了外部Maven安裝。轉到窗口 - >首選項 - > Maven - >安裝並在那裏配置它。 另外,請注意,Indigo附帶的Maven插件不能像以前的版本一樣工作,並且某些Maven插件可能不會直接受支持。另外,如果你之前沒有使用過Maven 3,並且你的POM中有插件版本號,那麼可能會有不兼容的情況,因爲並不是所有與Maven 2一起工作的插件都可以與Maven 3一起工作。儘管如此,所有人都應該有更新。請注意指定插件版本號是一個很好的習慣,如果你不這樣做,Maven 3會警告你。如果你還沒有做到這一點,請嘗試使用Maven 3從命令行構建項目,以更準確地瞭解問題所在。