title: Debug maven application in Intellij Idea
body: <p>I have a POM (standard web app):</p>
  
  <pre><code>&lt;build&gt;
      &lt;finalName&gt;sandbox&lt;/finalName&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.0.1.Final&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0.1.Final&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;jboss-home&gt;c:\dev\wildfly8\&lt;/jboss-home&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;install&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                          &lt;goal&gt;deploy&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>I want to run this application in Idea 13.1. I created Maven Run/Debug Configuration:</p>
  
  <p><img src="https://i.stack.imgur.com/V0ePS.png" alt="enter image description here"></p>
  
  <p>When I click Debug, all targets are executed and Wildfly is run but debugger window (tab) does not appear and the debug icon is grayed out. I think that the problem is in POM Wildfly configuration. But I do not know what to do. Thanks.</p>
  
  <p>PS I used similar pattern I used in another project with jetty plugin, which worked fine.</p>
  
  <p>Edit: I seek for a procedure that <strong>utilizes maven goals to build</strong> the project.</p>