我将JFrog Artifactory升级到最新版本,升级后我看到一些工件丢失,还有pom文件,我仍然将它们放在本地.m2目录中。有没有办法可以立即将所有这些工件重新发布/部署到远程Artifactory存储库?
答案 0 :(得分:2)
根据您对remote repository中缺少这些工件的评论,有两种可能的选择:
答案 1 :(得分:1)
使用mvn deploy将您的工件重新发布/部署到远程存储库。
确保将deploy目录指向主pom中的远程存储库。
如果您想专门上传文件,请使用以下命令
mvn deploy:deploy-file -DpomFile=your pom -Dfile=the jar you want to upload
-Durl=Url of the repository where the artifact need to be uploaded
-DrepositoryId=repository ID
参考文献:
https://maven.apache.org/plugins/maven-deploy-plugin/usage.html
https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html
http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
https://docs.oracle.com/middleware/1212/core/MAVEN/config_maven.htm#MAVEN314