I\'m trying to run exec-maven-plugin
\'s exec:java
goal on a simple two-module project where one module depends on the other. So far I can\'t find a
Goals in a multi-module project, when run from the parent, will run against all modules. I don't think that's what you want. You can try:
mvn exec:java -pl module2 -Dexec.mainClass=MyMain
That might work? More info:
However, I think it's more intuitive to change directory to the sub-module containing the executable before running it.