我正在学习maven。我使用maven 3.0.4。
当使用maven从archetype(做archetye:generate)生成一个新的richfaces项目时,它说它无法构建maven插件,因为缺少org.apache.maven.shared的POM文件:maven-invoker:jar: 2.0.11和org.apache.maven.shared:maven-script-interpreter:jar:1.0。
它告诉我们无法构建maven-archetype-plugin。
我可以从我的http浏览器访问maven-repo,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
答案 0 :(得分:0)
在评论中回答:
问题来自过滤的http访问。我改变了位置 问题解决了。我认为是企业级防火墙...... - Brahim Gaabab于2012年4月27日16:14你改变了什么? - KenB 12年6月27日19:59
我刚在公司外面访问了maven repo!问题是由于 那里配置错误的过滤。谢谢你的兴趣! - Brahim Gaabab于7年7月7日17:08