我已经下载了Eclipse STS 3.2.0并安装了Apache Tomcat 7,JDK 6和Maven 3.0.4,然后尝试使用Eclipse创建一个新的Spring MVC空项目。构建Spring MVC项目时出错
然而,当我尝试它里面是自动生成的使用Eclipse
运行,即使我没有写代码甚至一行在里面,所有代码的这个“空”的项目,我总是得到这个错误Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'GoodProjectSTS'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources- plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
当我检查是否安装了Maven和工作使用
mvn --version
我得到的输出以下
The program 'mvn' is currently not installed. You can install it by typing:
sudo apt-get install maven2
我已编辑的/ etc/enivronment并提出确保以下是在里面:
JAVA_HOME=”/usr/lib/jvm/java-6-sun”
M3_HOME=”/usr/local/apache-maven/apache-maven-3.0.2″
MAVEN_HOME=”/usr/local/apache-maven/apache-maven-3.0.2″
M3=”/usr/local/apache-maven/apache-maven-3.0.2/bin”
但我仍然得到同样的错误,当我键入MVN -version
所以,有人可以告诉我我在这里错过了什么?或者我如何解决这个问题并获得空应用程序运行?
注意:我的Ubuntu 10.04
下注2:以上运行:我试图卸载Maven就会使用http://lukieb.wordpress.com/2011/02/15/installing-maven-3-on-ubuntu-10-04-lts-server/但没有成功指令(同样的错误出现)重新安装,仍然MVN - 版本将返回错误
感谢
有你的路径添加$ MAVEN_HOME/bin中? –
可能是这个职位将帮助: http://stackoverflow.com/questions/13132551/error-while-building-spring-mvc-application – Tom
@TerryMa我已经添加MAVEN_HOME如问题所示,我应该添加/ bin到底? – MChan