转载自 http://blog.csdn.net/sky19891212/article/details/43924831?locationNum=7&fps=1,亲测好用~
设置方法,可以通过右键项目找到maven选项,open setting.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"> <servers> <server> <id>nexus-snapshots</id> <username>deployment</username> <password>123456</password> </server> </servers> <mirrors> <mirror> <id>nexus</id> <name>internal nexus repository</name> <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>--> <url>http://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings>