1、先设置本地maven配置,对应到远程仓库地址
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0http://maven.apache.org/xsd/settings-1.1.0.xsd"xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>远程releases仓库</id>
<username>远程仓库用户名</username>
<password>远程仓库密码</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
<server>
<id>远程snapshots仓库</id>
<username>远程仓库用户名</username>
<password>远程仓库密码</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
</servers>
<mirrors>
<mirror>
<id>远程仓库</id>
<name>远程仓库</name>
<url>远程仓库镜像地址</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<pluginGroups>
<pluginGroup>org.grails</pluginGroup>
</pluginGroups>
</settings>
2、以华为人脸识别核心包为例:
mvn deploy:deploy-file -DgroupId=com.huawei.apigateway -DartifactId=java-sdk-core -Dversion=3.1.2-SNAPSHOT -Dpackaging=jar -Dfile=本地路径/java-sdk-core-3.1.2.jar -DpomFile=本地路径/java-sdk-core-3.1.2.pom -Durl=远程仓库路径 -DrepositoryId=远程仓库id
网友评论