首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

Maven简介(1)——Maven的安装和settings.xml的配置

2013-03-14 
Maven简介(一)——Maven的安装和settings.xml的配置?xml version1.0 encodingUTF-8?settings xmlns

Maven简介(一)——Maven的安装和settings.xml的配置
<?xml version="1.0" encoding="UTF-8"?><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>D:\\develop\\mavenRepository</localRepository> <interactiveMode>true</interactiveMode> <offline>false</offline> <pluginGroups> </pluginGroups> <proxies> <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>proxyuser</username> <password>proxypass</password> <host>proxy.host.net</host> <port>80</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> </proxies> <servers> <server> <id>deploymentRepo</id> <username>repouser</username> <password>repopwd</password> </server> </servers> <mirrors> <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> </mirrors> <profiles> <profile> <id>jdk-1.5</id> <activation> <jdk>1.5</jdk> </activation> <repositories> <repository> <id>jdk15</id> <name>jdk1.5</name> <url>http://www.myhost.com/maven/jdk15</url> <layout>default</layout> <snapshotPolicy>always</snapshotPolicy> </repository> </repositories> </profile> </profiles> <activeProfiles> <activeProfile>jdk-1.5</activeProfile> </activeProfiles></settings>

<proxies> <proxy> <id>xxx</id> <active>true</active> <protocol>http</protocol> <username>用户名</username> <password>密码</password> <host>代理服务器地址</host> <port>代理服务器的端口</port> <nonProxyHosts>不使用代理的主机</nonProxyHosts> </proxy></proxies>

<servers> <server> <id>id</id> <username>用户名</username> <password>密码</password> </server> </servers>

<mirrors> <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>定义一个容易看懂的名称 </name> <url>http://my.repository.com/repo/path</url> </mirror></mirrors>

<profiles> <profile> <id>test</id> <activation> <activeByDefault>false</activeByDefault> <jdk>1.6</jdk> <os> <name>Windows 7</name> <family>Windows</family> <arch>x86</arch> <version>5.1.2600</version> </os> <property> <name>mavenVersion</name> <value>2.0.3</value> </property> <file> <exists>${basedir}/file2.properties</exists> <missing>${basedir}/file1.properties</missing> </file> </activation> ... </profile> </profiles>

<property> <name>hello</name></property>

<property> <name>hello</name> <value>world</value></property>

<profile> <activation> <file> <missing>hello/world</missing> </file> </activation></profile>

<repositories> <repository> <id>codehausSnapshots</id> <name>Codehaus Snapshots</name> <releases> <enabled>false</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://snapshots.maven.codehaus.org/maven2</url> <layout>default</layout> </repository> </repositories>

<activeProfiles> <activeProfile>alwaysActiveProfile</activeProfile> <activeProfile>anotherAlwaysActiveProfile</activeProfile> </activeProfiles>

 

热点排行