在mvn命令中指定pom.xml并混合其他项目的目标 [英] specify pom.xml in mvn command and mix goals of other project

查看:182
本文介绍了在mvn命令中指定pom.xml并混合其他项目的目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个问题。


  1. 我可以在mvn命令中指定pom.xml吗?

  2. 我可以在当前项目上执行mvn命令时混合另一个项目的目标吗?

  1. Can I specify the pom.xml in mvn command?
  2. Can I mix the goals of another project while executing mvn command on current project ?

例如:mvn clean-otherproject comple-otherproject instal- otherproject compile-thisproject

我可以使用多个mvn命令执行此操作,但我可以在单个maven命令。

I can do this with multiple mvn commands, but Can I do this in single maven command.

推荐答案

只需 mvn --help 就可以回答第一个问题:

Just mvn --help would have answered the first question:

 mvn -f otherPomFile.xml

没有。您可以简单地执行当前项目的阶段。您可以提供多个阶段,例如

No. You can simple execute the phases for the current project you are in. You can give multiple phases like

mvn clean install site site:deploy

这篇关于在mvn命令中指定pom.xml并混合其他项目的目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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