在pom.xml maven中添加远程存储库jar文件作为依赖项 [英] Adding remote repository jar file as dependency in pom.xml maven

查看:155
本文介绍了在pom.xml maven中添加远程存储库jar文件作为依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以添加远程存储库jar文件( https://repo.ah/lib/abc .jar )在maven pom.xml中作为java项目中的依赖项。如果是的话,请你分享一些例子。

Is it possible to add remote repository jar file (https://repo.ah/lib/abc.jar) in maven pom.xml as dependency in java project. if so, can you please share example.

推荐答案

不,不可能将完整的存储库添加为依赖项。这没有意义,因为存储库可以包含数万个工件。

No, it's not possible to add a complete repository as a dependency. This doesn't make sense, because a repository can contain ten thousands of artifacts.

如果您的项目需要非标准远程存储库中的工件,您可以指定这是通过 pom.xml 中的< repositories> 标记。

If your project requires artifacts which are not hosted in the standard remote repository, you can specify this via the <repositories> tag in your pom.xml .

<repositories>
    <repository>
        <id>vaadin-addons</id>
        <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
    <repository>
        <id>vaadin-snapshots</id>
        <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

更多信息:

存储库简介

设置多个存储库

这篇关于在pom.xml maven中添加远程存储库jar文件作为依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆