How to run Maven from another directory (without cd to project dir)?

Viewed 175961

Supposing my maven project is located in /some/location/project and my current location is /another/location/ how can I run maven build without changing to project location cd /some/location/project?

4 Answers

For me, works this way: mvn -f /path/to/pom.xml [goals]

You can try this:

pushd ../
maven install [...]
popd
Related