为什么我总是收到 [INFO] 无法在存储库中找到资源?

发布于 2024-10-16 21:40:47 字数 1571 浏览 2 评论 0原文

问候大家 我在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

作死小能手 2024-10-23 21:40:47

从存储库链接,它看起来像这样dependency 没有关联的 pom 文件。这就是警告的原因。

通常,存储库中的依赖项还有一个 pom 文件,它描述项目并指定其依赖项。 Maven 首先下载此 pom 文件,以便它可以解决传递依赖项(如果有)。

From the repository link, it looks like this dependency does not have an associated pom 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.

久而酒知 2024-10-23 21:40:47

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.

泪冰清 2024-10-23 21:40:47

Maven 无法到达依赖项所在的站点。

尝试

ping repo1.maven.org

在网络浏览器中运行或打开它。也许你应该设置防火墙以允许 Maven 从互联网下载东西。

Maven can't reach the sites where dependencies are located.

Try running

ping repo1.maven.org

or opening it in your web browser. Maybe you should set the firewall to allow Maven downloading stuff from internet.

少钕鈤記 2024-10-23 21:40:47

我使用了以下依赖项 - 对我有用。

<dependency>
    <groupId>velocity-tools</groupId>
    <artifactId>velocity-tools-generic</artifactId>
    <version>1.4</version>
</dependency>

I used the following dependency - works for me.

<dependency>
    <groupId>velocity-tools</groupId>
    <artifactId>velocity-tools-generic</artifactId>
    <version>1.4</version>
</dependency>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文