centos7 mvn 上传jar到私服

遇到如下问题 “Failed to transfer file: http://skf-nexus.xxxxx.com/re... Return code is: 401”

找一台有maven的机器修改配置

[root@dev-technology-215l ~]# cat /usr/local/apache-maven-3.3.9/conf/settings.xml

      
          
        
            
            xxxxx
            
            Nexus xxxxx
            
            http://nexus.xxxxx.com/repository/xxxxx-maven-central/
            
            
            central
        
      
    
           
            jdk-1.8  
              
                true  
                1.8  
                  
              
                1.8  
                1.8  
                1.8  
              
        
         
            dev
            
                
                    nexus
                    http://skf-nexus.xxxxx.com/repository/xxxxx-release/
                    
                        true
                    
                    
                        true
                    
                
            
        
    
   
        dev
    
    
        
            releases
            admin
            xxxxx-0312
        
    
            snapshots
            admin
            xxxxx-0312
        
    
      
          
            xxxxx-releases  
            Nexus Release Repository  
            http://skf-nexus.xxxxx.com/repository/xxxxx-release/  
          
          
            snapshots  
            Nexus Snapshot Repository  
            http://skf-nexus.xxxxx.com/repository/snapshots/  
          
    


jar 包上传命令
mvn deploy:deploy-file -DgroupId=com.csii.pe.http -DartifactId=security -Dversion=1.3 -Dpackaging=jar -Dfile="/tmp/maventest/com-csii-pe-http-security-1.3.jar" -Durl= http://skf-nexus.xxxxx.com/re... -DrepositoryId=releases

你可能感兴趣的:(maven3,linux运维,jar包)