maven配置详解

<settings 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/repositorylocalRepository>
    
    <interactiveMode>trueinteractiveMode>
    
    <usePluginRegistry>falseusePluginRegistry>
    
    <offline>falseoffline>
    
    <pluginGroups>
        
        <pluginGroup>org.codehaus.mojopluginGroup>
    pluginGroups>
    
    <proxies>
        
        <proxy>
            
            <id>myproxyid>
            
            <active>trueactive>
            
            <protocol>httpprotocol>
            
            <host>proxy.somewhere.comhost>
            
            <port>8080port>
            
            <username>proxyuserusername>
            
            <password>somepasswordpassword>
            
            <nonProxyHosts>*.google.com|ibiblio.orgnonProxyHosts>
        proxy>
    proxies>
    
    <servers>
        
        <server>
            
            <id>server001id>
            
            <username>my_loginusername>
            
            <password>my_passwordpassword>
            
            <privateKey>${usr.home}/.ssh/id_dsaprivateKey>
            
            <passphrase>some_passphrasepassphrase>
            
            <filePermissions>664filePermissions>
            
            <directoryPermissions>775directoryPermissions>
        server>
    servers>
    
    <mirrors>
        
        <mirror>
            
            <id>planetmirror.comid>
            
            <name>PlanetMirror Australianame>
            
            <url>http://downloads.planetmirror.com/pub/maven2url>
            
            <mirrorOf>centralmirrorOf>
        mirror>
    mirrors>
    
    <profiles>
        
        <profile>
            
            <id>testid>
            
            <activation>
                
                <activeByDefault>falseactiveByDefault>
                
                <jdk>1.5jdk>
                
                <os>
                    
                    <name>Windows XPname>
                    
                    <family>Windowsfamily>
                    
                    <arch>x86arch>
                    
                    <version>5.1.2600version>
                os>
                
                <property>
                    
                    <name>mavenVersionname>
                    
                    <value>2.0.3value>
                property>
                
                <file>
                    
                    <exists>${basedir}/file2.propertiesexists>
                    
                    <missing>${basedir}/file1.propertiesmissing>
                file>
            activation>
            <repository>
                <id>nexusid>
                <name>local private nexusname>
                <url>http://localhost:8081/nexus/content/groups/publicurl>
                <releases>
                    <enabled>trueenabled>
                releases>
                <snapshots>
                    <enabled>trueenabled>
                snapshots>
            repository>
        repositories>
        
        <repositories>
            
            <repository>
                
                <id>codehausSnapshotsid>
                
                <name>Codehaus Snapshotsname>
                
                <releases>
                    
                    <enabled>falseenabled>
                    
                    <updatePolicy>alwaysupdatePolicy>
                    
                    <checksumPolicy>warnchecksumPolicy>
                releases>
                
                <snapshots>
                    <enabled/>
                    <updatePolicy/>
                    <checksumPolicy/>
                snapshots>
                
                <url>http://snapshots.maven.codehaus.org/maven2url>
                
                <layout>defaultlayout>
            repository>
        repositories>
        
        <pluginRepositories>
            
            <pluginRepository>
                <releases>
                    <enabled/>
                    <updatePolicy/>
                    <checksumPolicy/>
                releases>
                <snapshots>
                    <enabled/>
                    <updatePolicy/>
                    <checksumPolicy/>
                snapshots>
                <id/>
                <name/>
                <url/>
                <layout/>
            pluginRepository>
        pluginRepositories>
    profile>
profiles>
         默认配置:
<activeProfiles>
    <activeProfile>devactiveProfile>
    
activeProfiles>
    配置解释:
    
<activeProfiles>
    
    <activeProfile>env-testactiveProfile>
activeProfiles>
settings>

你可能感兴趣的:(JavaEE开发,maven,maven)