title: Why would a maven-war-plugin generate a JAR instead of a WAR?
body: <p>I am following <a href="https://mvnwls.wordpress.com/2011/02/01/contract-first-cxf/" rel="noreferrer">this</a> <em>Contract first using CXF</em> tutorial and while the resulting <code>pom.xml</code> generates sources and even <strong>completes build successfully</strong>, it fails to create a WAR file.</p>
  
  <p>Instead, it creates a JAR file.</p>
  
  <p>My understanding is that the part in the <a href="https://mvnwls.wordpress.com/2011/02/01/contract-first-cxf/" rel="noreferrer">pom.xml</a> that's responsible for creating the WAR is:</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.1.1&lt;/version&gt;
    &lt;configuration&gt;
      &lt;outputDirectory&gt;D:/path/to/profile/autodeploy&lt;/outputDirectory&gt;
    &lt;/configuration&gt;
   &lt;/plugin&gt;
  </code></pre>
  
  <p>I don't see any <code>&lt;goal&gt;</code> or <code>&lt;execution&gt;</code> element there (unlike in the <code>build-helper-maven-plugin</code> one), but I also understand that with this plugin this is implied as even the <a href="http://maven.apache.org/plugins/maven-war-plugin//usage.html" rel="noreferrer">official usage page</a> demonstrates:</p>
  
  <pre><code>&lt;project&gt;
    ...
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;configuration&gt;
            &lt;webappDirectory&gt;/sample/servlet/container/deploy/directory&lt;/webappDirectory&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    ...
  &lt;/project&gt;
  </code></pre>
  
  <p>So... what am I missing?</p>
  
  <p>What could possibly explain a <code>maven-war-plugin</code> that behaves in unexpected way like this and produces a JAR instead of a WAR by default?</p>
  
  <p>Is there a way to force it to produce a WAR? </p>