如何使用 maven deploy 只部署子模块? [英] How to Deploy only the sub-modules using maven deploy?
本文介绍了如何使用 maven deploy 只部署子模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何只部署项目的子模块?我有一个项目;
How do i deploy only the sub-modules of the project? i have a project as;
ProjectA
- Submodule B
- Submodlue C
- Submodule D
子模块打包成jar,部署到maven repo,怎么只能把子模块部署到maven仓库,不能部署到主项目?
The submodules are packaged as jar and is deployed to maven repo.how can only the sub -modules be deployed to the maven repository and not the main project?
推荐答案
把这个放在你不想部署的模块(或模块的 pom.xml)中:
Put this in module(s)(or module's pom.xml) that you don't want to deploy:
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
因为这是由子模块继承的,所以你必须把它放在你想要部署的子模块中:
Since this is inherited by submodules, you have to put this in submodules that you do want to deploy:
<properties>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
这篇关于如何使用 maven deploy 只部署子模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文