在不构建子模块的情况下安装父POM [英] Install parent POM without building Child modules

查看:267
本文介绍了在不构建子模块的情况下安装父POM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Maven项目中有一个父POM,其结构如下:

I have a parent POM in a Maven project, with this structure:

             parent
               |
        ---------------
        |             |
      child1       child2

我想在本地REPO中安装"parent" 的POM,以允许 child1 进行我在dependencyManagement中所做的一些更改,但是我无法执行常规的全新安装" ,因为"child2" 已损坏并且无法构建.

I want to install the POM of the "parent" in the local REPO to allow child1 take some changes that I did in the dependencyManagement, but I cannot do a regular "clean install" because "child2" is broken and will not build.

哪种方法是使用Maven执行此操作的正确方法(除了转到父pom并注释"child2" 模块之外).

Which is the proper way to do this with maven (other than going to the parent pom and commenting the "child2" module).

推荐答案

在mvn命令中使用'-N'选项.

Use the '-N' option in the mvn command.

来自mvn -h:

-N,-非递归不要递归到子项目中

-N,--non-recursive Do not recurse into sub-projects

这篇关于在不构建子模块的情况下安装父POM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆