为什么我总是得到[INFO]无法在资源库中找到资源?
问题描述:
问候所有 我使用maven 2在我的春天项目 ,当我尝试使用命令来建立从终端项目(MVN清洁MVN安装)为什么我总是得到[INFO]无法在资源库中找到资源?
它不能从任何回购协议的下载任何依赖,我总是得到这样的信息:
Downloading: http://repo1.maven.org/maven2/velocity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom
[INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' in repository first (http://repo1.maven.org/maven2)
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2//velocity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom
[INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' in repository second (http://mirrors.ibiblio.org/pub/mirrors/maven2/)
Downloading: http://repository.jboss.com/maven2//velocity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom
[INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' in repository jboss (http://repository.jboss.com/maven2/)
Downloading: http://maven.jahia.org/maven2/velocity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom
[INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' in repository additional (http://maven.jahia.org/maven2)
Downloading: http://208.79.234.53:8081/artifactory/libs-releases-local/velocity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom
[WARNING] Unable to get resource 'velocity-tools:velocity-tools-generic:pom:1.4' from repository host.varaza.com (http://208.79.234.53:8081/artifactory/libs-releases-local): Error transferring file: Connection timed out
任何想法,为什么会出现这种情况?
答
从存储库link看起来这个dependency
没有关联的pom
文件。这是警告的原因。
通常情况下,存储库中的依赖关系还有一个pom文件,该文件描述项目并指定其依赖关系。 Maven首先下载这个pom文件,这样它可以解析传递依赖关系(如果有的话)。
答
我使用了以下依赖项 - 适用于我。
<dependency>
<groupId>velocity-tools</groupId>
<artifactId>velocity-tools-generic</artifactId>
<version>1.4</version>
</dependency>
答
Maven无法访问依赖关系所在的站点。
尝试运行
ping repo1.maven.org
或Web浏览器中打开它。也许你应该设置防火墙,让Maven从互联网上下载东西。
答
Maven是只是试图从你的资料库得到pom
文件,并会尝试,只要它不能下载。
这很可能是因为您引用的库(依赖项)在任何可用的远程存储库中都没有pom
文件。这可能是正常的。
不过,如果你想摆脱的消息,你可以部署最小pom
文件在贵公司的存储库的依赖关系。您可以选择仅在本地安装它们,但其他开发人员仍然会收到这些消息。
它之前下载,但现在它不能从任何回购下载,当我ping它给我未知的主机? – 2011-02-10 08:50:27
浏览器呢?对于通过`http:// repo2.maven.org/maven2的/`你应该得到的东西,如: `指数/ maven2的/ ../ 了HTTPClient/01 - 11月,2005年05:03 方丈/ 12- Feb-2010 00:20 acegisecurity/2005年12月23日12:20 激活/ 2005年12月21日15:37` – 2011-02-10 08:54:05