mvn archetype:create报错

[INFO] ------------------------------------------------------------------------
[INFO] Error creating from archetype


Embedded error: Archetype does not exist: Unable to determine the release version


Try downloading the file manually from the project website.


Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file



Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]




  org.apache.maven.archetypes:maven-archetype-quickstart:jar:RELEASE


说了原因(红色),也说了提示(蓝色)。

解决方法:

1.打开网址:http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/
2.选择最新版本并且下载最新的“maven-archetype-quickstart-1.0-alpha-4.jar ”文件
3.安装这个archetype到maven本地仓库。使用命令如下:mvn install:install-file -DgroupId=org.apache.maven.archtypes -Dar
 tifactId=maven-archetype-quickstart -Dversion=1.0-alpha-4 -Dpackaging=jar -Dfile=d:/install/maven-archetype-quickstart-1.0-alpha-4.jar。注意-Dfile是刚下载的文件的路径。

你可能感兴趣的:(mvn archetype:create报错)