使用maven创建新项目出现Unable to determine the release vers
?今天碰见一到一个很郁闷的事情,当使用mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app来创建一个新项目时,有时候会出现以下错误:解决过程如下:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
----------------------------------------
[INFO] Building Maven Default Project
[INFO]??? task-segment: [archetype:create] (aggregator-style)
[INFO]
----------------------------------------
。。。。。。。
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: com.mycompany.app
[INFO]
------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------
[INFO] Failed to resolve artifact.
GroupId: org.apache.maven.archetypes
ArtifactId: maven-archetype-quickstart
Version: RELEASE
Reason: 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-arch
etype-quickstart \
??????? -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file
? org.apache.maven.archetypes:maven-archetype-quickstart:jar:RELEASE
?[INFO]
------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Apr 17 07:08:50 MDT 2007
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------