首页 新闻 会员 周边 捐助

maven异常,http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

0
悬赏园豆:180 [待解决问题]

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.448 s
[INFO] Finished at: 2015-06-29T16:22:06+08:00
[INFO] Final Memory: 9M/108M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.3:generate (default-cli) on project standalone-pom: Execution default-cli of go
al org.apache.maven.plugins:maven-archetype-plugin:2.3:generate failed: Plugin o
rg.apache.maven.plugins:maven-archetype-plugin:2.3 or one of its dependencies co
uld not be resolved: The following artifacts could not be resolved: org.codehaus
.groovy:groovy:jar:1.8.3, org.apache.ant:ant:jar:1.8.1: Failure to find org.code
haus.groovy:groovy:jar:1.8.3 in http://localhost:8081/nexus/content/groups/publi
c was cached in the local repository, resolution will not be reattempted until t
he 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

悟.空的主页 悟.空 | 初学一级 | 园豆:4
提问于:2015-06-29 16:40
< >
分享
所有回答(4)
0

你是不是断网了啊,有可能是更新创库失败

贝壳风铃 | 园豆:202 (菜鸟二级) | 2015-07-02 09:43
1

检查下setting.xml文件

会开窗的金莲 | 园豆:216 (菜鸟二级) | 2015-07-03 10:08
0

参考这个网址:http://stackoverflow.com/questions/29147329/unable-to-create-a-new-maven-hello-world-project

第一种原因是:create is deprecated in maven 3.0.5 and beyond,将create替换成generate,正确写法是:mvn archetype:generate -DarchetypeArtifactId=maven-archetype-archetype

第二种原因是:……我也不知到为什么,但是我的是这个原因,在pom文件里加入了这段话成功的。

 

Add

<dependency><groupId>commons-lang</groupId><artifactId>commons-lang</artifactId><version>2.3</version></dependency>

to your pom file in

{user.home}/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/2.3

iOnesmile | 园豆:202 (菜鸟二级) | 2015-12-22 15:38
0

联网试一试

LQliu | 园豆:202 (菜鸟二级) | 2018-11-24 16:12
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册