]]>Maven 鍒濇瀛︿範蹇冨緱 settings.xml鐨勪綔鐢?/title>http://www.tkk7.com/liuzheng/articles/162042.html鍒橀摦 鍒橀摦 Wed, 21 Nov 2007 03:18:00 GMThttp://www.tkk7.com/liuzheng/articles/162042.htmlhttp://www.tkk7.com/liuzheng/comments/162042.htmlhttp://www.tkk7.com/liuzheng/articles/162042.html#Feedback0http://www.tkk7.com/liuzheng/comments/commentRss/162042.htmlhttp://www.tkk7.com/liuzheng/services/trackbacks/162042.html
Depending on where your machine is located, it may be necessary to make a few more preparations for Maven to function correctly. If you are behind a firewall, then you will have to set up Maven to understand that. To do this, create a <your-home-directory>/.m2/settings.xml file with the following content:
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.mycompany.com</host>
<port>8080</port>
<username>your-username</username>
<password>your-password</password>
</proxy>
</proxies>
</settings>
If Maven is already in use at your workplace, ask your administrator if there if there is an internal Maven proxy. If there is an active Maven proxy running, then note the URL and let Maven know you will be using a proxy. Create a <your-home-directory>/.m2/settings.xml file with the following content.
<mirrors>
<mirror>
<id>maven.mycompany.com</id>
<name>My Company's Maven Proxy</name>
<url>http://maven.mycompany.com/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>