title: Running a specific Maven plugin goal from the command line in a sub-module of a multi-module reactor project
body: <p>I'm looking for a general technique here, but let's give a specific example. I have a multi-module project and I'd like to run the <code>exec:java</code> goal from the command-line against one of the sub-modules of my project.</p>
  
  <p>I know one approach is that I can run <code>mvn install</code> on the whole project and then just go into the sub-module directory, run the <code>exec:java</code> command from the command line, and have artifacts resolved to my local repository. But running <code>mvn install</code> all the time gets pretty tedious.</p>
  
  <p>What I'd really like is the ability to run <code>exec:java</code> against the Maven reactor, where the classpath is constructed from the active modules of the project in the Maven reactor. The problem is that I'm not sure this is possible. A naive approach is to run the <code>exec:java</code> goal from the root of the project, but this tries to run the plugin against every module in the project, as opposed to the target module I'm interested in.</p>
  
  <p>Any idea? I know my motivating example was <code>exec:java</code>, but really there are a number of single plugin goals that I'd like to run against my project from time to time outside of the scope of the full build lifecycle.</p>