Try mvn -pl module2 -am exec:java -Dexec.mainClass=MyMainClass from the
root directory.


Regards,
htfv (Aliaksei Lahachou)


On Tue, Jun 19, 2012 at 1:27 AM, Mike Craig <[email protected]> wrote:

> I'm trying to use the exec-maven-plugin to run a main class in a
> multi-module project. The main class is in module2, which is dependent on
> module1. So far the only way I've been able to do this is:
>
>    mvn install
>    cd module2
>    mvn exec:java -Dexec.mainClass=MyMainClass
>
> But I shouldn't have to modify my local repository to run a goal in a
> self-contained project. I should be able to do this without installing,
> like so (from the top of the project):
>
>    mvn compile
>    mvn exec:java -Dexec.mainClass=MyMainClass
>
> Is this possible?
>
> More generally, is it possible (from a plugin) for one module to use
> another module without installing?
>
> Cheers,
> Mike
>

Reply via email to