specify pom.xml in mvn command and mix goals of other project

java, maven, maven-2

Solution

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

Problem

I have multiple questions. - Can I specify the pom.xml in mvn command? Can I mix the goals of another project while executing mvn command on current project ? Eg: mvn clean-otherproject comple-otherproject instal-otherproject compile-thisproject I can do this with multiple mvn commands, but Can I do this in single maven command.

Original source