为什么我总是收到 [INFO] 无法在存储库中找到资源?
问候大家 我在我的 Spring 项目中使用 Maven 2 当我尝试使用命令(mvn clean-mvn install)从终端构建项目时,
它无法从任何存储库下载任何依赖项,并且我总是得到如下信息:
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
任何想法,为什么会发生这种情况?
greetings all
I am using maven 2 in my spring project
and when I try to build the project from the terminal using the commands (mvn clean-mvn install)
it cannot download any dependency from any of the repos, and I always gets Info like :
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
any ideas, why such thing occurs ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
从存储库链接,它看起来像这样
dependency
没有关联的pom
文件。这就是警告的原因。通常,存储库中的依赖项还有一个 pom 文件,它描述项目并指定其依赖项。 Maven 首先下载此 pom 文件,以便它可以解决传递依赖项(如果有)。
From the repository link, it looks like this
dependency
does not have an associatedpom
file. This is the reason for the warning.Typically, dependencies in the repository also have a pom file, which describes the project, as well as specifies its dependencies. Maven first downloads this pom file, so that it can resolve transitive dependencies, if any.
Maven只是尝试从您的存储库获取
pom
文件,并且只要无法下载它们就会一直尝试。发生这种情况很可能是因为您引用的库(依赖项)在任何可用的远程存储库中都没有
pom
文件。这可能是正常的。但是,如果您想删除该消息,您可以在公司存储库中为这些依赖项部署最少
pom
文件。您可以选择仅在本地安装它们,但团队中的其他开发人员仍然会收到这些消息。Maven is just trying to get the
pom
files from your repositories and will try for as long as it can't download them.This is happening most probably because the libraries (dependencies) you reference don't have a
pom
file in any of the remote repositories available. This is probably normal.However if you want to get rid of the message you could deploy minimal
pom
files for those dependencies in your company's repository. You can choose to just install them locally but then other developers in your team would still have those messages.Maven 无法到达依赖项所在的站点。
尝试
在网络浏览器中运行或打开它。也许你应该设置防火墙以允许 Maven 从互联网下载东西。
Maven can't reach the sites where dependencies are located.
Try running
or opening it in your web browser. Maybe you should set the firewall to allow Maven downloading stuff from internet.
我使用了以下依赖项 - 对我有用。
I used the following dependency - works for me.