你知道mvnrepository.com的maven个人资料吗? [英] Do you know the maven profile for mvnrepository.com?

查看:726
本文介绍了你知道mvnrepository.com的maven个人资料吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的maven项目中包含一些依赖项。这些依赖关系在默认Mven 2存储库中不可用。 http://repo1.maven.org/maven2/



他们可以在 http://mvnrepository.com/



但我找不到此网站的配置文件,以包含在我的settings.xml中



有谁知道这个存储库的URL和配置文件是什么?



谢谢。

解决方案>

通过mvnrepository.com找到您的jar后,悬停download(JAR)链接,您将看到包含您的jar的存储库的链接(您可以右键单击复制链接 URL以获取URL,您的浏览器是什么)



然后,您必须将此存储库添加到项目使用的存储库中,在您的pom.xml中:

 < project> 
...
< repositories>
< repository>
< id> my-alternate-repository< / id>
< url> http://myrepo.net/repo< / url>
< / repository>
< / repositories>
...
< / project>

编辑:现在MVNrepository.com已经发展:您可以在存储库中找到存储库的链接部分:



类别

组织

首页

资源库

用法


I am trying to include some dependencies in my maven project. These dependencies are not available in the default Mven 2 repository http://repo1.maven.org/maven2/.

They are available at http://mvnrepository.com/

But I couldn't find the profile for this site to include in my settings.xml

Does anyone know what this repository's url and profile is?

Thanks.

解决方案

Once you've found your jar through mvnrepository.com, hover the "download (JAR)" link, and you'll see the link to the repository which contains your jar (you can probably Right clic and "Copy link URL" to get the URL, what ever your browser is).

Then, you have to add this repository to the repositories used by your project, in your pom.xml :

<project>
  ...
  <repositories>
    <repository>
      <id>my-alternate-repository</id>
      <url>http://myrepo.net/repo</url>
    </repository>
  </repositories>
  ...
</project>

EDIT : now MVNrepository.com has evolved : You can find the link to the repository in the "Repository" section :

Categories
Organization
HomePage
Repository
Usages

这篇关于你知道mvnrepository.com的maven个人资料吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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