1. <mirror>
    2. <id>nexus-aliyun</id>
    3. <mirrorOf>central</mirrorOf>
    4. <name>Nexus aliyun</name>
    5. <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    6. </mirror>
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    4. xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    5. <localRepository>D:\Maven\Repository</localRepository> <!--需要改成自己的maven的本地仓库地址-->
    6. <interactiveMode>true</interactiveMode>
    7. <offline>false</offline>
    8. <pluginGroups>
    9. </pluginGroups>
    10. <proxies>
    11. <proxy>
    12. <id>proxy1</id>
    13. <active>true</active>
    14. <protocol>http</protocol>
    15. <host>10.37.84.120</host>
    16. <port>8080</port>
    17. <username>liuyan768</username>
    18. <password>143143Dy</password>
    19. <nonProxyHosts>paic.com.cn|10.180.204.60</nonProxyHosts>
    20. </proxy>
    21. </proxies>
    22. <servers>
    23. <server>
    24. <id>deploymentRepo</id>
    25. <username>repouser</username>
    26. <password>repopwd</password>
    27. </server>
    28. </servers>
    29. <profiles>
    30. <profile>
    31. <id>jdk-1.8</id>
    32. <activation>
    33. <jdk>1.8</jdk>
    34. </activation>
    35. <repositories>
    36. <repository>
    37. <id>central</id>
    38. <name>Maven Repository Switchboard</name>
    39. <layout>default</layout>
    40. <url>http://repo1.maven.org/maven2</url>
    41. <releases>
    42. <enabled>true</enabled>
    43. </releases>
    44. <snapshots>
    45. <enabled>false</enabled>
    46. </snapshots>
    47. </repository>
    48. <repository>
    49. <id>nexus</id>
    50. <name>local private nexus</name>
    51. <url>http://10.180.204.60:38081/nexus/content/repositories/thirdparty/</url>
    52. <releases>
    53. <enabled>true</enabled>
    54. </releases>
    55. <snapshots>
    56. <enabled>false</enabled>
    57. </snapshots>
    58. </repository>
    59. </repositories>
    60. <pluginRepositories>
    61. <pluginRepository>
    62. <id>nexus</id>
    63. <name>local private nexus</name>
    64. <url>http://maven.oschina.net/content/groups/public/</url>
    65. <releases>
    66. <enabled>true</enabled>
    67. </releases>
    68. <snapshots>
    69. <enabled>false</enabled>
    70. </snapshots>
    71. </pluginRepository>
    72. </pluginRepositories>
    73. </profile>
    74. </profiles>
    75. <activeProfiles>
    76. <activeProfile>jdk-1.8</activeProfile>
    77. </activeProfiles>
    78. </settings>

    setting文件路径

    settings.xml的默认路径就:个人目录/.m2/settings.xml
    如:
    windowns: C:\Users\你的用户名.m2\settings.xml
    linux: /home/你的用户名/.m2/settings.xml