英文:
Maven - disable parent distributionManagement in child POM?
问题
我们正在使用第三方的父POM,其中他们定义了自己的distributionManagement。
我们正在使用自己的服务器来发布构件。因此,每当我使用mvn clean deploy命令时,应用程序都会尝试将构件上传到在父POM的distributionManagement中定义的父服务器。
请问有谁能够提供任何方法,在子pom.xml文件中禁用父distributionManagement呢?
英文:
We are using third party parent pom where they defined own distributionManagement.
We are useing own server to publish artifacts. So whenever i am using mvn clean deploy, then application is trying to upload artifacts on parent server which is defined in parent distributionManagement.
Can anyone please provide any input to disable parent distributionManagement in child pom.xml file?
答案1
得分: 3
只需覆盖它。
无论如何,您需要它来部署,因此没有禁用它的必要。
英文:
Just overwrite it.
You need it anyway to deploy, so there is no point in disabling it.
答案2
得分: 2
因为你提到了你有自己的服务器,所以你不需要禁用它。你需要覆盖这个设置。
你应该能够在子 POM 中定义一个新的 <distributionManagement> 部分,这将完全覆盖父 POM 中的设置。
英文:
As you mentioned you have your own server so you do NOT need to disable it. You need to overwrite the setting.
You should be able to define a new <distributionManagement> section in the child POM which will completely overwrite the settings from parent POM.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论