maven 创建项目报错,求帮忙!!

J2EE 码拜 9年前 (2015-05-11) 1109次浏览 0个评论
 

[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

亲,你是要用maven创建java项目还是java web项目?
40分
给你个创建java web项目的指令;
mvn archetype:create -DgroupId=easitech.test -DartifactId=test-all -DarchetypeArtifactId=maven-archetype-webapp    

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

经查看:
      org.apache.maven.plugins:maven-archetype-plugin:2.2里面没有create
     我本地的路径是org.codehaus.groovy:groovy:1.8.3
     它为什么要找org.codehaus.groovy:groovy:jar:1.8.3
引用 2 楼  的回复:

给你个创建java web项目的指令;
mvn archetype:create -DgroupId=easitech.test -DartifactId=test-all -DarchetypeArtifactId=maven-archetype-webapp  

groupId:项目属于哪一个组;一般是公司名+项目名
DartifactId:定义当前Maven项目在组中唯一的ID(即……

同样的错误

引用 1 楼  的回复:

亲,你是要用maven创建java项目还是java web项目?

mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes 
  -DgroupId=com.ibm.devworks -DartifactId=NumOps
这是指令,应该不是这个问题。。可能是环境配置问题

mvn archetype:create -DgroupId=easitech.test -DartifactId=test-all -DarchetypeArtifactId=maven-archetype-webapp     问题解决
mvn archetype:generate

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明maven 创建项目报错,求帮忙!!
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!