日期:2014-05-18  浏览次数:20647 次

maven 创建项目报错,求帮忙!!
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.2:create (default-cli) on project standalone-pom: Execution default-cli of goal
 org.apache.maven.plugins:maven-archetype-plugin:2.2:create failed: Plugin org.a
pache.maven.plugins:maven-archetype-plugin:2.2 or one of its dependencies could
not be resolved: Failure to find org.codehaus.groovy:groovy:jar:1.8.3 in http://
localhost:8081/nexus/content/groups/public was cached in the local repository, r
esolution will not be reattempted until the update interval of Nexus has elapsed
 or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
------解决方案--------------------
给你个创建java web项目的指令;
mvn archetype:create -DgroupId=easitech.test -DartifactId=test-all -DarchetypeArtifactId=maven-archetype-webapp    

groupId:项目属于哪一个组;一般是公司名+项目名
DartifactId:定义当前Maven项目在组中唯一的ID(即是你的项目名)
-DarchetypeArtifactId=maven-archetype-webapp    代表创建的是一个web项目