[英]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 在父项目中,我有多个项目,并以这个简单的示例作为项目B的依赖项目使用项目common-3rdparty ,并且在项目B的 pom.xml文件中添加了以下几行
<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 现在我正在使用Artifactory进行依赖项管理,并将common-3rdparty项目添加到Artifactory中,但是现在当我运行mvn eclipse:eclipse
项目时,构建成功,但是common-3rdparty.jar没有下载,因此Project B给出了例外
common-3rdparty.jar missing common-3rdparty.jar丢失
So it mean somehow common-3rdparty.jar not downloaded from Artifactory . 因此,这意味着未从Artifactory下载的common-3rdparty.jar 。 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. 现在我的简单问题是,如果我有10个项目和9个项目需要运行第10个项目,那么我们在第10个项目pom.xml中添加了9个依赖项,现在我需要在Artifactory端或pom文件中进行哪些更改,以便它可以轻松地获得依赖项目。
The remote-repos
contain only the remote repositories (hence the name). 所述remote-repos
仅包含远程存储库(因此而得名)。 If you deployed the jar into Artifactory yourself, it resides in one of the local repositories, that's why maven can't find it. 如果您自己将jar部署到Artifactory中,它就位于本地存储库之一中,这就是为什么maven找不到它。 You should use lib-releses
instead of remote-repos
in your maven configuration. 您应该在maven配置中使用lib-releses
而不是remote-repos
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.