简体   繁体   中英

How to manage maven depend project from Artifactory?

Inside a Parent project i have multiple project and take this simple example Project common-3rdparty used as a depend project for Project B and in Project B pom.xml file i have added below lines

<dependencies>
        <dependency>
            <groupId>com.pre.cdd.common</groupId>
            <artifactId>common-3rdparty</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <type>jar</type>
        </dependency>
</dependencies>

Now i am using Artifactory for dependency management and added common-3rdparty project into Artifactory but now when i am running mvn eclipse:eclipse project build successful but common-3rdparty.jar not downloaded so Project B giving exception

common-3rdparty.jar missing

So it mean somehow common-3rdparty.jar not downloaded from Artifactory . What i am doing wrong here?

EDIT:-

Now my simple question is that if i have 10 project and 9 project needed to run 10th one so we added 9 dependencies in 10th project pom.xml now what changes i have to do in Artifactory side or pom file so it will easily get depended projects.

The remote-repos contain only the remote repositories (hence the name). If you deployed the jar into Artifactory yourself, it resides in one of the local repositories, that's why maven can't find it. You should use lib-releses instead of remote-repos in your maven configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM