修改Maven配置文件settings.xml
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>Nexus321</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>Nexus321</password>
</server>
pom.xml中修改【上传jar包】配置
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus ReleaseRepository</name>
<url>http://111.62.52.214:31234/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus SnapshotRepository</name>
<url>http://111.62.52.214:31234/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
pom.xml中修改【下载jar包】配置
<repositories>
<!-- 配置nexus远程仓库 -->
<repository>
<id>nexus-releases</id>
<name>Nexus Snapshot Repository</name>
<url>http://*****:31234/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<!-- 配置从哪个仓库中下载构件,即jar包 -->
<pluginRepositories>
<pluginRepository>
<id>nexus-releases</id>
<name>Nexus Snapshot Repository</name>
<url>http://*****:31234/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。