美文网首页
如何在nexus私服添加第三方仓库

如何在nexus私服添加第三方仓库

作者: 大浪滔滔 | 来源:发表于2018-02-06 17:35 被阅读689次

举例,我们要在maven工程中引入以下组件:

<dependency>
      <groupId>org.hyperic</groupId>
      <artifactId>sigar</artifactId>
      <version>1.6.4</version>
</dependency>

在默认中央仓库http://search.maven.org中没有找到这个组件。接下来,该怎么办呢?

1、搜索第三方jar所在的仓库

浏览器打开http://mvnrepository.com,找到相应的组件。

006tNc79gy1fo6u5a1s36j31kw0zbqe8.jpg

注意,下面红框是该组件所在的第三方仓库:http://repo.typesafe.com/typesafe/maven-releases/

2、在私服中加入该仓库

打开sonata nexus私服,增加一个proxy:


006tNc79gy1fo6uimc247j316e10wajv.jpg

地址为上面的仓库地址,其他为默认值即可。

3、将该仓库加入public group

006tNc79gy1fo6upgr55ej312m10w7dh.jpg

这个public group对应我们在maven的setting.xml中的私有仓库地址:

<mirror>
    <id>nexus</id>
    <mirrorOf>*</mirrorOf>
    <url>http://IP:PORT/nexus/content/groups/public</url>
</mirror>

MAVEN仓库资源搜索的几个网站

http://mvnrepository.com/
http://search.maven.org
https://repository.sonatype.org/index.html

相关文章

  • nexus 创建私服仓库上传jar包

    前提条件 : 本地搭建好nexus私服仓库 如何搭建nexus私服请参考: Nexus、Maven仓库介绍以及在项...

  • 如何在nexus私服添加第三方仓库

    举例,我们要在maven工程中引入以下组件: 在默认中央仓库http://search.maven.org中没有找...

  • maven仓库设置

    Maven 中央仓库地址:1、http://www.sonatype.org/nexus/ 私服nexus工具使...

  • maven

    仓库地址 : 1、http://www.sonatype.org/nexus/ 私服nexus工具使用 2、htt...

  • MAVEN中央仓库地址大全

    Maven 中央仓库地址: 1、私服nexus工具使用 http://www.sonatype.org/nexus...

  • maven中央仓库大全

    Maven 中央仓库地址: 1、私服nexus工具使用 http://www.sonatype.org/nexus...

  • maven学习笔记(二)

    仓库(nexus) A-->coreB-->serviceC-->action本地仓库、私有仓库、中央仓库私服 n...

  • Maven实战之nexus

    使用专门的Maven仓库管理软件Nexus构建Maven私服。 nexus下载地址 https://www.son...

  • maven 命令行部署到nexus仓库

    maven 命令行部署到nexus仓库 1.在maven的配置文件conf.xml中添加私服配置 reposit...

  • Maven私服-Nexus搭建

    1. 为什么使用Nexus? 如果没有私服,我们所需的所有构件都需要通过maven的中央仓库和第三方的Maven仓...

网友评论

      本文标题:如何在nexus私服添加第三方仓库

      本文链接:https://www.haomeiwen.com/subject/psngzxtx.html