I have a maven project built in '/some/where' which I wish to run/execute from another directory '/foo/bar'. I am currently running commands such as:
cd /some/where
mvn exec:java -Dexec.mainClass=org.xmlcml.cml.rest.Client
with
/some/where/pom.xml
I wish to do something like:
cd /foo/bar
mvn -p /some/where/pom.xml exec:java -Dexec.mainClass=org.xmlcml.cml.rest.Client
but don't know the syntax or whether it is allowed.
If it is allowed where are relative filenames referenced to (a) the directory containing the pom.xml , i.e. /some/where
or (b) the current directory /foo/bar