无法使用M2Eclipse下载jar(0.10.0,使用Maven 3) [英] Unable to download jars using M2Eclipse (0.10.0, using Maven 3)
问题描述
http:// [REPO_URL] / central / = 1276221188566
甚至使用Maven 3命令行。 Jars无法下载。任何关于如何发生这种情况的想法?
首先,lastupdated文件的存在是无关紧要的。我们需要知道调试输出(mvn -X dependency:tree)。然后你提到你正在使用存储库管理器并镜像每个请求 - 所以根据这个设置settings.xml 指南。如果您刚刚指定了具有存储库管理器位置的镜像元素和要代理的存储库(URL)(没有启用实时更改快照策略的配置文件),您将会在调试日志。修复它后,它应该工作。
编辑:您可以随时使用maven settings.xml中的组存储库的URL http:// hostname / nexus / content / groups / public
+工件的路径,如 org / apache / maven / someartifact / maven-metadata.xml
并查看nexus是否可以代理请求并提供所需的内容。如果这样做,那么原因必须在maven设置或pom定义中。
I am using M2Eclipse (0.10.0, Maven 3)in projects. I can add Maven dependency using m2eclipse. But dependency jars couldn't be downloaded. Instead, it created a file in each local repo folder named [JAR_Name].jar.lastupdate. The content of this file is some thing like : http://[REPO_URL]/central/=1276221188566
Even using Maven 3 command line. Jars couldn't be downloaded. Any idea about how could this happen?
First off, the presence of "lastupdated" file is irrelevant. We need to know the debug output (mvn -X dependency:tree). Then you mentioned you were using repository manager and mirroring every request to it - so setup settings.xml according to this guide . If you just specified the mirror element with repository manager location and what repositories (URLs) you want to proxy ,(without that profile enabled which is practically changing policy for getting snapshots), you would have something like "central repository disabled" messages in your debug log. After you fix it, it should work.
EDIT: You can always use the URL of group repository from maven settings.xml http://hostname/nexus/content/groups/public
+ path to the artifact like "org/apache/maven/someartifact/maven-metadata.xml
" and see if nexus can proxy the request and serve what you want. If this works, then the reason must be either in maven settings or pom definition.
这篇关于无法使用M2Eclipse下载jar(0.10.0,使用Maven 3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!