這里假定需要將
<dependency>
<groupId>faceid</groupId>
<artifactId>faceid</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
對應的組件添加到maven私服http://127.0.0.1:8081/上的標識為thirdparty倉庫中去。
配置settings.xml文件,在servers節點下添加一個server節點,具體如下:
<servers>
<server>
<id>nexus</id>
<username>admin</username>
<password>123456</password>
</server>
</servers>
切換到FaceId.jar所在目錄,執行如下命令:
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節點匹配。