通过使用以下内容简化操作
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"> <proxies> <proxy> <id>myproxy</id> <active>true</active> <protocol>http</protocol> <username>user</username> <!-- Put your username here --> <password>pass</password> <!-- Put your password here --> <host>123.45.6.78</host> <!-- Put the IP address of your proxy server here --> <port>80</port> <!-- Put your proxy server's port number here --> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> <!-- Do not use this setting unless you know what you're doing. --> </proxy> </proxies> </settings>
在Linux / Unix下,将其放在下
~/.m2/settings.xml。在Windows下,将其放在
c:documents andsettingsyouruser.m2settings.xml或下
c:usersyouruser.m2settings.xml。
除非您真的知道它们的用途,否则不需要
<mirrors/>,
<profiles/>和
<settings/>部分。



