title: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar
body: <p>So I was trying to go ahead and create a <code>.ear</code> file for an existing <code>maven</code> project and further deploy it on <code>WebLogic server</code>. For the same, I went ahead to create the <code>WAR</code>,<code>JAR</code> and the <code>EAR</code> module and followed these steps for it - </p>
  
  <p><code>Right click</code> on <code>parent project</code>, select <code>new</code>, select <code>maven module</code>, Named it as <code>projectnameJARModule</code> and then finished the <code>wizard</code>.</p>
  
  <p>Did the same process for creating a <code>projectnameWARModule</code> and a <code>projectnameEARModule</code> module. Once they were made, I added the <code>WAR</code> and the <code>JAR</code> modules as <code>dependencies</code> to the <code>EAR module</code>.Further, I went ahead to install the <code>maven modules</code> by <code>Right Clicking</code> on the <code>projectnameWARModule</code> folder and chose <code>Run As - Maven Install</code>. Upon this, I get the following error in the console (Full console log below) - </p>
  
  <hr>
  
  <pre><code>T E S T S
  -------------------------------------------------------
  Running org.CADJARModule.AppTest
  Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
  
  Results :
  
  Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
  
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ CADJARModule ---
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO] 
  [INFO] projectname ............................................... SUCCESS [  0.957 s]
  [INFO] projectnameJARModule ...................................... FAILURE [ 33.425 s]
  [INFO] projectnameWARModule Maven Webapp ......................... SKIPPED
  [INFO] projectnameEARModule ...................................... SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 34.806 s
  [INFO] Finished at: 2015-12-01T18:16:20+05:30
  [INFO] Final Memory: 9M/126M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) on project projectnameJARModule: Error assembling JAR: For artifact {org.glassfish.jersey.containers:jersey-container-servlet-core:null:jar}: The version cannot be empty. -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  [ERROR] 
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;goals&gt; -rf :projectnameJARModule
  </code></pre>
  
  <p>Any idea how do I get rid of this? Many Thanks</p>
  
  <p>Following is the <code>pom.xml</code> for the <code>Parent Module</code> - </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;groupId&gt;Project_name&lt;/groupId&gt;
  &lt;artifactId&gt;Project_name&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;name&gt;Project_name&lt;/name&gt;
  &lt;build&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5.1&lt;/version&gt;
                  &lt;inherited&gt;true&lt;/inherited&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
      &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;configuration&gt;
          &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
          &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-bom&lt;/artifactId&gt;
                  &lt;version&gt;${jersey.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.fasterxml.jackson.jaxrs&lt;/groupId&gt;
                  &lt;artifactId&gt;jackson-jaxrs-json-provider&lt;/artifactId&gt;
                  &lt;version&gt;2.6.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
                      &lt;groupId&gt;javax&lt;/groupId&gt;
                      &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
                      &lt;version&gt;7.0&lt;/version&gt; &lt;!-- Put here the version of your Java EE app, in my case 7.0 --&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
  
            &lt;dependency&gt;
                      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                      &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
                      &lt;version&gt;3.1.0&lt;/version&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                      &lt;artifactId&gt;jstl&lt;/artifactId&gt;
                      &lt;version&gt;1.2&lt;/version&gt;
              &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-container-servlet-core&lt;/artifactId&gt;
              &lt;!-- use the following artifactId if you don't need servlet 2.x compatibility --&gt;
              &lt;!-- artifactId&gt;jersey-container-servlet&lt;/artifactId --&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-media-moxy&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
  
      &lt;properties&gt;
          &lt;jersey.version&gt;2.16&lt;/jersey.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
      &lt;modules&gt;
          &lt;module&gt;Project_nameJARModule&lt;/module&gt;
          &lt;module&gt;Project_nameWARModule&lt;/module&gt;
          &lt;module&gt;Project_nameEARModule&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Following is the <code>pom.xml</code> for the <code>WAR Module</code>- </p>
  
  <pre><code>    &lt;?xml version="1.0"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
      &lt;groupId&gt;Projectname&lt;/groupId&gt;
      &lt;artifactId&gt;Projectname&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;ProjectnameWARModule&lt;/groupId&gt;
  &lt;artifactId&gt;ProjectnameWARModule&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;name&gt;ProjectnameWARModule Maven Webapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;finalName&gt;ProjectnameWARModule&lt;/finalName&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Following is the <code>pom.xml</code> for my <code>JAR</code> module - </p>
  
  <pre><code>    &lt;?xml version="1.0"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
      &lt;groupId&gt;Project_Name&lt;/groupId&gt;
      &lt;artifactId&gt;Project_Name&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;CADJARModule&lt;/groupId&gt;
  &lt;artifactId&gt;CADJARModule&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;CADJARModule&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>