Maven setting.xml 配置详解

释放双眼,带上耳机,听听看~!
maven settings.xml详解
🤖 由 ChatGPT 生成的文章摘要

Maven setting.xml 配置详解

Maven


settings.xml详解

声明规范

 xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

localRepository

/opt/repository

interactiveMode

true

usePluginRegistry

false

offline

false

pluginGroups


  
  org.codehaus.mojo

proxies


  
  
   
   myproxy
   
   true
   
   http
   
   proxy.somewhere.com
   
   8080
   
   proxyuser
   
   somepassword
   
   *.google.com|ibiblio.org
  

servers


  
  
   
   server001
   
   my_login
   
   my_password
   
   ${usr.home}/.ssh/id_dsa
   
   some_passphrase
   
   664
   
   775
  

mirrors

  
  
   
   planetmirror.com
   
   PlanetMirror Australia
   
   http://downloads.planetmirror.com/pub/maven2
   
   central
  

profiles


  
  
   
   test

Activation

   

    false

    1.5

    

     Windows XP

     Windows

     x86

     5.1.2600
    

    

     mavenVersion

     2.0.3
    

    

     ${basedir}/file2.properties

     ${basedir}/file1.properties
    
   

Properties

      
        /path/to/tomcat/instance
      

Repositories

 
           nexus 
           local private nexus 
           http://localhost:8081/nexus/content/groups/public 
           true
            true
   






    

     codehausSnapshots

     Codehaus Snapshots

     

      false

      always

      warn
     

     
      
     

     http://snapshots.maven.codehaus.org/maven2

     default
    
   

   
 
                     
           
      
     
     
      
     
     
          
        
  
 

activeProfiles

默认配置:
 
    devactiveProfile> 
    
activeProfiles>

配置解释:


 
    
    env-testactiveProfile>
 activeProfiles>
settings>

例子:

我们公司nexus地址:172.16.1.40

Maven settings.xml 如下:

xml version="1.0" encoding="UTF-8"?>




 xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  
  /opt/repository
  

  

  
  
    
    org.apache.maven.plugins
    org.mortbay.jetty
        com.oracle.weblogic
  

  
  
    
  

  
  
    

    
 
    
        nexus
        admin
        anonymous123
    
    
        releases
        admin
        anonymous123
    
    
        snapshots
        admin
        anonymous123
    

        
            thirdparty
            admin
            anonymous123
        
  

  
  
    
  
   
            nexus
            internal nexus repository
            http://172.16.1.40:8080/nexus/content/groups/public 
            * 
         

  

  
  
    

    
    

   
 
apatch 
 
 
re-apatch 
remote apatch 
http://inno.starhubdev.com/nexus/content/groups/public/

true


true



 
 


 
ibiblio 
 
 
re-ibiblio 
remote ibiblio 
https://nexus.sourcesense.com/nexus/content/repositories/public/ 

true


true

 
 
 





 
redev 
 
 
re-nexus 
remote nexus 
http://repository.sonatype.org/content/groups/public/ 

true


true

 
 
 





            dev
            
                
                    nexus
                    http://172.16.1.40:8080/nexus/content/groups/public
                    true
                    true
                
            
            
                
                    nexus
                    http://172.16.1.40:8080/nexus/content/groups/public
                    true
                    true
                
            
    
  

  
   
    dev 
    
    


给TA打赏
共{{data.count}}人
人已打赏
Linux

npm && node 环境搭建

2017-12-6 21:37:11

Linux

CentOS下python2.6升级2.7

2018-5-18 16:20:08

2 条回复 A文章作者 M管理员
  1. 博主你这网站插件太多了,我一上你这网站cpu就飙升

    • 后期会进行优化,现在关闭了几个插件!

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索