关键词搜索

源码搜索 ×
×

马云私服

发布2019-07-25浏览538次

详情内容

这个标题就是为了博眼球。其实是Maven私服。

我司原则上不允许开发机连接互联网。那开发中这包那包怎么办?

搞个私服咯。或者叫本地仓库?

流程是酱紫的:
有一台服务器能访问互联网,那么我们就在它上面搭建一个maven仓库,然后在我们项目的pom.xml里,将仓库地址指向这台服务器:

    <repositories>
        <repository>
            <id>maven-public</id>
            <name>monkey nexus</name>
            <url>http://192.168.0.248:8019/repository/maven-public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>maven-public</id>
            <name>monkey nexus</name>
            <url>http://192.168.0.248:8019/repository/maven-public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

我们要的包,它有自然就直接拿,没有的话,它会自动去拿,然后再给我们。好爽。

这个本地仓库如何搭建呢?应该是要用到Nexus这种东东。我没用过,我同事搭建的。我年纪大了,记性不好,有点什么东西先记下来。现在都记在CSDN了。如果哪天CSDN倒闭了,那我的知识将全部丢失。我个人的命运,已经跟CSDN绑定在一起。

不行,必须改变这种局面。

参考资料:
Maven私服(Repository Manager) - Nexus安装和使用(详细过程)

相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载