zoukankan      html  css  js  c++  java
  • nexus 3.x私服配置 windows/linux 版本

    一 安装教程 版本是3.X (有不懂的尽管在下面回复我,我也是闲的没事干)
    参考:https://www.jianshu.com/p/2a6a734bd76a

    1. 官网下载 linux,windows版本
    2. 配置环境变量,windows:将bin目录 放在环境变量  path上
    3. 进入到 bin 目录下,
        1)windows启动   nexus.exe /run
        2) linux 启动     ./nexus /run
    4. 启动成功后,访问  localhost:8081   
        1) 账号是 admin
        2) 密码在另外一个文件夹,sonatype-work 进去,能找到一个  xxx.password文件,里面有密码,
        3)输入密码后,进入需要修改密码,(我是:admin123)
        4)这里注意 :还需要一个什么auth 啥的,一定要勾选,不然后面有的麻烦呢
    5. 至此 nexus 安装完成
    
    6.  maven 的 setting.xml文件配置,
        <servers>
    	<server>
    	  <id>releases</id>   # 注意,此id与pom文件的添加的releases id需保持一致
    	  <username>admin</username>
    	  <password>admin123</password>
    	</server>
    	<server>
    	  <id>snapshot</id>    # 注意,此id与pom文件的添加的snapshot id需保持一致
    	  <username>admin</username>
    	  <password>admin123</password>
    	</server>
    </servers>
    
    <mirrors>
    	<mirror>
    		<id>nexus</id>
    		<url>http://192.168.0.87:8081/repository/maven-public/</url>
    		<mirrorOf>central</mirrorOf>
    	</mirror>
    </mirrors>
    
    <activeProfiles>
    	<activeProfile>nexus</activeProfile>  
    </activeProfiles>
    
    7. 还需要在项目的pom.xml配置 
        <distributionManagement>
            <snapshotRepository>
                <id>snapshot</id>     # 这个id与上面的id对应
                <name>snapshot</name>
                <url>http://192.168.0.87:8081/repository/maven-snapshots/</url>    # 会推送到中央仓库和snapshots库
            </snapshotRepository>
            <repository>
                <id>releases</id>
                <name>releases</name>
                <url>http://192.168.0.87:8081/repository/maven-releases/</url>   # 会推送到中央仓库和releases库
            </repository>
        </distributionManagement>
    
    8. 此时私服和项目全部配置完毕,
    
    9. 遇到的坑集合
        1)首先就是nexus启动后,修改密码那里,有个 auth 的勾选一定要勾选
        2)首次登录密码在 nexus 同级文件夹的另一个文件中
        3)同一个版本的jar,推送时可能会报错,很好解决,百度一下,只要修改下页面上的属性即可解决
        4)setting.xml 和 pom.xml的 id 需要保持一致
        5)如果私服挂了,则中央仓库则不能下载,这点需注意
  • 相关阅读:
    简易花台制作攻略
    欢迎
    VxWorks操作系统MakeFile(三)
    原创连载:往事
    VxWorks操作系统MakeFile(五)
    致亲爱的板儿的一封信
    VxWorks操作系统MakeFile(二)
    华为NE5000E集群路由器荣获InfoVision奖
    台式机安装黑苹果Mac OS X Snow Leopard 10.6相关资源
    未能加载文件或程序集Office, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
  • 原文地址:https://www.cnblogs.com/duende99/p/12809108.html
Copyright © 2011-2022 走看看