开发者

Why i always gets the [INFO] Unable to find resource in repository?

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开发者_如何学JAVA-releases-local): Error transferring file: Connection timed out

any ideas, why such thing occurs ?


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.


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 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.


I used the following dependency - works for me.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜