這里假定需要將
<dependency>
<groupId>faceid</groupId>
<artifactId>faceid</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
對(duì)應(yīng)的組件添加到maven私服http://127.0.0.1:8081/上的標(biāo)識(shí)為thirdparty倉庫中去惰聂。
配置settings.xml文件结胀,在servers節(jié)點(diǎn)下添加一個(gè)server節(jié)點(diǎn)忱嘹,具體如下:
<servers>
<server>
<id>nexus</id>
<username>admin</username>
<password>123456</password>
</server>
</servers>
切換到FaceId.jar所在目錄,執(zhí)行如下命令:
mvn deploy:deploy-file -DgroupId=faceid -DartifactId=faceid -Dversion=1.0.0.RELEASE -Dpackaging=jar -Dfile=FaceId.jar -Durl=http://127.0.0.1:8081/repository/thirdparty/ -DrepositoryId=nexus
其中,repositoryId需要與settings.xml文件中servers/server/id節(jié)點(diǎn)匹配仍律。