简体   繁体   English

maven 将第三个没有 jar 的 pom 部署到 nexus 存储库

[英]maven deploying 3rd pom's without jar to nexus repository

When I want to deploy 3rd jars to my nexus 3 repository I use this command:当我想将第三个 jar 部署到我的 nexus 3 存储库时,我使用以下命令:

mvn deploy:deploy-file
-Dfile=<path-to-jar>
-DpomFile=<path-to-pom>
-DrepositoryId=<id-to-map-on-server-section-of-settings.xml>
-Durl=<url-of-the-repository-to-deploy>

but this command works only on jars with pom, and there is many artifacts that have only pom without jar, so i am looking for a way to deploy only pom without a jar file.但是这个命令只适用于带有 pom 的 jar,并且有很多工件只有 pom 没有 jar,所以我正在寻找一种方法来部署没有 jar 文件的 pom。 My maven version is 3.3.9我的 Maven 版本是 3.3.9

mvn deploy:deploy-file
-DgroupId=com.xxx.xxx.xxxx
-DartifactId=xxxxx
-Dversion=x.x.x
-DgeneratePom=false
-DrepositoryId=nexus 
-Dpackaging=pom
-Dfile=D:/xxx/xxxxx-x.x.x.pom
-DpomFile=D:/xxx/xxxxx-x.x.x.pom
-Durl=http://xxx.xx.xx.xx:8081/repository/thirdparty

-Dfile, is mandatory for Maven deploy-file . -Dfile,对于Maven deploy-file是必需的。 Therefore you have to specify a file.因此,您必须指定一个文件。

In this case, you can point the same pom file for both -DpomFile and -Dfile.在这种情况下,您可以为 -DpomFile 和 -Dfile 指向相同的 pom 文件。

This works in Nexus OSS version 3.23.0-03 with Maven 3.5.2这适用于 Nexus OSS 版本 3.23.0-03 和 Maven 3.5.2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM