title: Unpack an EAR file using maven
body: <p>I have an EAR file from some build. I want to extract the contents of this EAR file into another folder. I am confused how to do this. I have looked and tried 
  <a href="http://maven.apache.org/plugins/maven-ear-plugin/" rel="nofollow">http://maven.apache.org/plugins/maven-ear-plugin/</a>
  and
  <a href="http://maven.apache.org/plugins/maven-dependency-plugin/usage.html" rel="nofollow">http://maven.apache.org/plugins/maven-dependency-plugin/usage.html</a></p>
  
  <p>but either maven is unable to find the file or it has dependency issues. </p>
  
  <p>Since I am new to maven I don not understand how to set these plugins up.</p>
  
  <p>I got the following error on using the below plugin.</p>
  
  <p><em>Failure to find ECM:ECM:ear:1.0 in <a href="http://repo.maven.apache.org/maven2" rel="nofollow">http://repo.maven.apache.org/maven2</a> was cached in the local repository</em></p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;unpack&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;unpack&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;artifactItems&gt;
                              &lt;artifactItem&gt;
                                  &lt;groupId&gt;ECM&lt;/groupId&gt;
                                  &lt;artifactId&gt;ECM&lt;/artifactId&gt;
                                  &lt;version&gt;1.0&lt;/version&gt;
                                  &lt;type&gt;ear&lt;/type&gt;
                              &lt;/artifactItem&gt;
                          &lt;/artifactItems&gt;
                          &lt;outputDirectory&gt;${project.build.directory}/earoutput&lt;/outputDirectory&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>