我目前正在学习maven。我使用 Maven 3.0.4。
当使用maven从archetype(做archetye:generate)生成一个新的richfaces项目时,它说它无法构建maven插件,因为缺少org.apache.maven.shared:maven-invoker:jar:2.0.11的POM文件和 org.apache.maven.shared:maven-script-interpreter:jar:1.0。
它告诉我们无法构建 maven-archetype-plugin。
我可以从我的 http 浏览器访问 maven2 存储库,其中包含 maven-script-interpreter 和 maven-invoker。
这是命令行和错误。谢谢!
D:\dev\testRichfaces>mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes -DarchetypeArtifactId=richfaces-archetype-simpleapp -DarchetypeVersion=4.2.0-SNAPSHOT -DgroupId=org.docs.richfaces -DartifactId=new_project
[INFO] Scanning for projects..
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>
>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<
<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --
-
[WARNING] The POM for org.apache.maven.shared:maven-invoker:jar:2.0.11 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.shared:maven-script-interpreter:jar:1.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.066s
[INFO] Finished at: Thu Apr 26 15:20:23 GMT+01:00 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.2:generate (default-cli) on project standalone-pom: Execution default-cli of go
al org.apache.maven.plugins:maven-archetype-plugin:2.2:generate failed: Plugin o
rg.apache.maven.plugins:maven-archetype-plugin:2.2 or one of its dependencies co
uld not be resolved: The following artifacts could not be resolved: org.apache.m
aven.shared:maven-invoker:jar:2.0.11, org.apache.maven.shared:maven-script-inter
preter:jar:1.0: Failure to find org.apache.maven.shared:maven-invoker:jar:2.0.11
in http://repo.maven.apache.org/maven2 was cached in the local repository, reso
lution will not be reattempted until the update interval of central 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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException