Maven cannot find dependencies [dependencyResolutionException]

In mine pom.xmlwith me

    <repositories>
        <repository>
            <id>rep</id>
            <name>Repository</name>
            <url>http://artifacts.com/rep</url>
            <releases>
               <enabled>true</enabled>
               <updatePolicy>always</updatePolicy>
            </releases>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <groupId>com.project.rest</groupId>
            <artifactId>common</artifactId>
            <version>2.0.5</version>
        </dependency>

    </dependencies>

And I have this error

Downloading: http://artifacts.com/rep/com/project/rest/common/2.0.5/common-2.0.5.pom
[WARNING] The POM for com.project.rest:common:jar:2.0.5 is missing, no dependency information available

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.154s
[INFO] Finished at: Tue Feb 03 06:58:35 BRT 2015
[INFO] Final Memory: 9M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project server: Could not resolve dependencies for project org.server:
server:jar:2.5.1-SNAPSHOT: The following artifacts could not be resolved: com.project.rest:common:jar:2.0.5:
Could not find artifact com.project.rest:common:jar:2.0.5 in rep (http://artifacts.com/rep) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

PS I hid all the real urls and package.

This basically shows that it can load .pom, but also displays a warning.

What is the problem?

0
source share
4 answers

The first line of “Download: ...” only says that maven is trying to load the artifact. This is not a statement of success. If maven is successful, you will get another line starting with "Downloaded: ..."

, maven . URL- , , .

BTW <updatePolicy>always</updatePolicy> -, .

+2

, . com.project.rest:common 2.0.5.

? ? , ? , ( .m2///...)

+1

, , POM, .. MAVEN..m2 (, c ) , , , com.project.rest.

0

DependencyResolutionException

(: Maven Confluence)

, Maven . :

, , :

0
source

All Articles