1.第一種方式,通過setting.xml的方式配置數據源
該文件路徑D:\IDE\apache-maven-3.2.3\conf\setting.xml
該文件大部分內容都已經注釋,我們需要添加如下內容:
<profile> <id>dev</id> <!-- repositories and pluginRepositories here--> <repositories> <repository> <id>nexus-aliyun</id> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile>
</profiles>
<activeProfiles> <activeProfile>dev</activeProfile> </activeProfiles>
