maven私服

1.上传jar包到私服

  首先私服认证:


  
    nexus-releases
    admin
    admin321
  

  
    nexus-snapshots
    admin
    admin321
  

  
    3rdParty
    admin
    admin321
  

pom.xml指定


  
    nexus-releases
    releases Repository
    http://127.0.0.1:8081/repository/maven-releases/
  

  
    nexus-snapshots
    snapshots Repository
    http://127.0.0.1:8081/repository/maven-snapshots/
  

  
    3rdParty
    3rdParty Repository
    http://127.0.0.1:8081/repository/3rdParty/
  

 

3.部署

  mvn deploy:deploy-file -DgroupId=net.sf -DartifactId=json-lib -Dversion=2.4 -Dpackaging=jar -Dfile=E:/json-lib-2.4.jar -Durl=http://192.168.1.222/nexus/repository/releases/ -DrepositoryId=nexus-releases
2.从私服上下载jar


  
    jdk1.8
    
    
      true
      1.8
    

    
      1.8
      1.8
      1.8
    

    
      
        maven-public
        http://192.168.124.13:8081/repository/maven-public/

        
        
          true
        

        
          true
          always
        

      
      
        3rdParty
        http://192.168.124.13:8081/repository/3rdParty/
        
          true
        

        
          true

          

          always
        
      
   
  

 

转载于:https://www.cnblogs.com/But-you/p/11608013.html

你可能感兴趣的:(maven私服)