2016.6.21 maven使用cmd新建项目时,failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate...

在学习maven的时候,想要新建一个maven工程,在命令行执行create或generate命令。

错误如图所示:

failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate...

解决办法:

http://doc.okbase.net/Josh_Persistence/archive/192456.html

这里面提到了四种可能的原因及解决办法。

环境变量配置什么的检查就不提了。

(1)jdk版本的原因

查看maven的README.txt文件可以看到maven对jdk版本的要求。

测试结果:可以知道我的jdk是匹配的。

(2)命令语句的原因

archetype:create命令已经过期,需要使用 archetype:generate 来进行代替,因为maven在3.0.5及以上就建议采用genrate命令了,建议大家尽量采用genrate代替create命令。

测试过,不管是generate还是create都失败。

(3)maven插件的原因

maven-archetype-plugin 2.4版本的插件有问题,换其它版本进行创建,于是采用以下指令进行尝试:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:create  -DgroupId=com.chuanliu.c11 -DartifactId=c11searcher

测试结果:还是失败。

(4)删除repository/org/apache/maven/plugins/下的maven-archetype-plugin

测试结果:成功!

删除完毕后,再运行刚刚的命令,会发现这个文件夹又会重新被download,然后项目就正确创建了。

时间: 2024-08-24 21:37:01

2016.6.21 maven使用cmd新建项目时,failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate...的相关文章

Maven创建项目: Failed to execute goal org.apache.maven.plugin( mvn archetype:create)

一.概述: 在使用mvn 命令mvn archetype:create -DgroupId=com.chuanliu.c11 -DartifactId=c11searcher在控制创建maven项目和pom项目时,没有创建成功,错误信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli)  on project standalone-p

maven报 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile(defalut-compile) on project 项目名称:No such compile 'javac'

这个问题纠结了一天,在另外一个电脑是正常的,但是从服务器下载下来到另外一个电脑的时候却出现了如下图问题 看到javac大家都会想到是编译出现问题,而本地的配置如下图所示: 看着配置都是一致的,会是哪里的问题呢?经网上咨询有个大神说是可能是maven没有配置指定的jdk原因,原因如下: maven是个项目管理工具,如果我们不告诉它我们的代码要使用什么样的jdk版本编译的话,它就会用maven-compiler-plugin默认的jdk版本来进行处理,这样就容易出现版本不匹配的问题,以至于可能导致编

解决maven项目 maven install失败 错误 Failed to execute goal org.apache.maven.plugins

1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3.4 :compile ( default -compile) on project oecp: Compilation failure 2.解决方法:使用自己的jdk,记住是jdk,因为jdk里本身包含jre.而不是单纯的jre.本人初学者,表达肤浅,请看勿笑. 解决maven项目 maven install失败 错误 Fa

【maven】maven 项目 deploy 报错:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7

======================= 参考地址: https://blog.csdn.net/liuxiao723846/article/details/52604377 报错: maven 项目 deploy  报错: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project 项目名XXX: Deployment

Maven项目报错:Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clea

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project study-search: Failed to clean project: Failed to delete D:\Pxxtarget\tomcat\logs\access_log.2017-3-24 [ERROR] [ERROR] To see the full stac

Maven错误“Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create ”解决

用maven3新建一个项目时,输入的命令如下: mvn archetype:create 出现错误如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of mojo org.apache.maven.plugins:mav

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (dist) on project hadoop-kms: An Ant BuildException has occured

编译cdh版hadoop2.5.0出现的问题 系统: CentOs66 64位 JDK:1.7 Maven: 3.0.5 Protobuf: libprotoc 2.5.0 编译命令: mvn package -DskipTests -Pdist,native **************************************************************************************** [INFO] -----------------------

mvn install 报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2 错误: 找不到符号

报错信息 在Eclipse中执行mvn install时,console端显示如下报错信息: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ERP: Compilation failure: Compilation failure: [ERROR] \test01\src\main\java\HStyl

Maven Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean Failed to delete access_log

I'm trying to run simple struts project using maven and tomcat. When I'm trying to exucute next goals:clean install tomcat7:run ,there is an error : [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean)