Setting.xml配置
该配置一般存在与系统用户目录下的.m2隐藏目录下。
其中地址配置仓库如下:
<mirrors>
<!--自己的仓库-->
<mirror>
<id>acompe</id>
<name>acompe-publicl</name>
<url>http://maven.acompe.com:8081/repository/maven-public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!--阿里云仓库-->
<mirror>
<id>aliyum</id>
<name>aliyum-publicl</name>
<url>https://maven.aliyun.com/repository/central</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
其中用户信息配置如下:
<servers>
<server>
<id>acompe-snapshots</id>
<username>yanguoyu</username>
<password>wanzhy123</password>
</server>
<server>
<id>acompe-releases</id>
<username>yanguoyu</username>
<password>wanzhy123</password>
</server>
</servers>
pom.xml配置
该配置一般因创建项目而存在,构建项目时使用。
配置deploy时,应使用如下配置:
<project>
<distributionManagement>
<repository>
<id>acompe-releases</id>
<name>acompe-verification-release</name>
<url>http://maven.acompe.com:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>acompe-snapshots</id>
<name>acompe-verification-snapshots</name>
<url>http://maven.acompe.com:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>