我似乎无法对maven进行任何操作,因为它无法下载它的依赖关系。当我尝试从http://openejb.apache.org/ejb3-tutorial.html运行示例应用程序,它给了我一些错误:无法解决与maven的依赖关系
D:\apache-maven-3.0.3\openejbsamples\simple-stateless>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenEJB :: Examples :: Simple Stateless Pojo 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.454s
[INFO] Finished at: Thu Oct 13 11:47:26 CST 2011
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.ap
ache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo1
.maven.org/maven2): Error transferring file: repo1.maven.org: Unknown host repo1.maven.org -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
为什么我不能下载库?
更新:没关系。我的老板告诉我,我无法做到这一点,因为公司的代理设置。无论如何,我只是想研究ejb最快的方式,如果可能的话不使用maven?
嘿,谢谢你的快速反应。是的,我们在这里确实有着异国情调的联系,而我的老板似乎认为这是不可能的,因为我们在这里得到了一些严格的政策,而网络管理员也无济于事。我想我会在家里做。 –
但如果你有一个代理服务器,你只需要'url','port',或者'username','password'。这些设置应该在系统中的某个地方找到,因为您可以将此问题发布到stackoverflow :)检查您的浏览器的代理设置,您可能会在那里找到您需要的。 – tolitius