title: Debugging with exec-maven-plugin
body: <p>I am using <code>exec-maven-plugin</code> to execute my java app and run debug from my IDE (IntelliJ) with the following setup:</p>
  
  <pre><code>&lt;plugin&gt;
     &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
     &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
     &lt;version&gt;1.4.0&lt;/version&gt;
     &lt;executions&gt;
        &lt;execution&gt;
          &lt;id&gt;exec_1&lt;/id&gt;
          &lt;phase&gt;deploy&lt;/phase&gt;
          &lt;goals&gt;
              &lt;goal&gt;java&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
     &lt;/executions&gt;
     &lt;configuration&gt;
         &lt;mainClass&gt;com.myapp.app&lt;/mainClass&gt;
     &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>And it works very well. Then, I change my setup to execute a realistic <code>java</code> command line which would run the same app:</p>
  
  <pre><code>&lt;plugin&gt;
     &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
     &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
     &lt;version&gt;3.0.0&lt;/version&gt;
     &lt;executions&gt;
        &lt;execution&gt;
          &lt;id&gt;exec_1&lt;/id&gt;
          &lt;phase&gt;deploy&lt;/phase&gt;
          &lt;goals&gt;
              &lt;goal&gt;exec&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
     &lt;/executions&gt;
     &lt;configuration&gt;
        &lt;executable&gt;java&lt;/executable&gt;
         &lt;arguments&gt;
             &lt;argument&gt;-cp&lt;/argument&gt;
             &lt;argument&gt;
                 "dir1";"dir2;etc..."
             &lt;/argument&gt;
             &lt;argument&gt;com.myapp.app&lt;/argument&gt;
         &lt;/arguments&gt;
     &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>And it works to execute the application, but it does not attach the Debugger to the IDE. So, what additional argument I could add to make it catch the debug interruptions?</p>