zoukankan      html  css  js  c++  java
  • maven使用nexus服务器

    1.找到maven的安装路径,例如:C:apache-maven-3.3.9
    
    打开conf目录下的settings.xml文件
    
    2.在<servers>节点下,配置
        <server>
          <id>nexus</id>
          <username>用户名</username>
          <password>密码</password>
        </server>
    
    3.在<profiles>节点下配置
       <profile>  
            <id>nexus</id>  
            <repositories>  
                <repository>  
                    <id>nexus</id>  
                    <name>Nexus</name>  
                    <url>http://http://nexus_ip:8081/nexus/content/groups/public/</url>  
                    <releases>  
                        <enabled>true</enabled>  
                    </releases>  
                    <snapshots>  
                        <enabled>true</enabled>  
                    </snapshots>  
                </repository>  
            </repositories>  
            <pluginRepositories>  
                <pluginRepository>  
                    <id>nexus</id>  
                    <name>Nexus</name>  
                    <url>http://http://nexus_ip:8081/nexus/content/groups/public</url>  
                    <releases>  
                        <enabled>true</enabled>  
                    </releases>  
                    <snapshots>  
                        <enabled>true</enabled>  
                    </snapshots>  
                </pluginRepository>  
            </pluginRepositories>  
        </profile> 
      
    4.在<settings>节点下配置
      <activeProfiles>  
        <activeProfile>nexus</activeProfile>  
      </activeProfiles> 
    

    把自己开发的jar包上传到Nexus服务器,在maven中即可引用

    例如:

    <dependency>
           <groupId>org.testng</groupId>
           <artifactId>testng</artifactId>
           <version>6.9.8</version>
    </dependency>
    

      

  • 相关阅读:
    c#遍历文件夹获得所有文件
    var的一些理解
    Pycharm使用秘籍
    RESTful规范
    Django文档阅读-Day4
    Django文档阅读-Day3
    Django文档阅读-Day2
    Django文档阅读-Day1
    你的博客园奇丑无比怎么办?
    基于scrapy框架输入关键字爬取有关贴吧帖子
  • 原文地址:https://www.cnblogs.com/lincj/p/7002954.html
Copyright © 2011-2022 走看看