title: maven build ear - how I can build just a .ear file and not the exploded ear dir?
body: <p>I just need a myEar.ear file as output of my maven build.</p>
  
  <p>I don't want the dir myEar (the exploded ear version).</p>
  
  <p>To be clear, this is my build output:</p>
  
  <pre><code>20/02/2017  11:37    &lt;DIR&gt;          myEar
  20/02/2017  11:37         7.985.535 myEar.ear
  </code></pre>
  
  <p>I just want the myEar.ear.</p>
  
  <p>Thanks.</p>
  
  <p>Here my pom.xml of the ear:</p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;name&gt;myEar&lt;/name&gt;
    &lt;description&gt;myEar&lt;/description&gt;
  
    &lt;groupId&gt;com.foo&lt;/groupId&gt;
    &lt;artifactId&gt;myEar&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;packaging&gt;ear&lt;/packaging&gt;
  
      &lt;parent&gt;
      &lt;/parent&gt;
  
    &lt;properties&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
  </code></pre>
  
  <p>(...)</p>
  
  <pre><code>&lt;/dependencies&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
  
  
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-ear-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.8&lt;/version&gt;
          &lt;configuration&gt;
              &lt;defaultLibBundleDir&gt;lib&lt;/defaultLibBundleDir&gt;
              &lt;generatedDescriptorLocation&gt;${basedir}/src/main/application/META-INF&lt;/generatedDescriptorLocation&gt;
              &lt;modules&gt;
                  &lt;webModule&gt;
                      &lt;groupId&gt;com.foo&lt;/groupId&gt;
                      &lt;artifactId&gt;myWeb&lt;/artifactId&gt;                    
                      &lt;contextRoot&gt;/myWeb&lt;/contextRoot&gt;
                  &lt;/webModule&gt;
                   &lt;webModule&gt;
                      &lt;groupId&gt;com.foo&lt;/groupId&gt;
                      &lt;artifactId&gt;myWS&lt;/artifactId&gt;                     
                      &lt;contextRoot&gt;/&lt;/contextRoot&gt;
                  &lt;/webModule&gt;
              &lt;/modules&gt;
                  &lt;archive&gt;
                      &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt;
                  &lt;/archive&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
  
         &lt;directory&gt;${basedir}/../target/diraliases/EARHOMEDIR1036&lt;/directory&gt;
         &lt;finalName&gt;myEar&lt;/finalName&gt;
  
     &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>