title: How do I correctly use SNAPSHOTS dependencies with EARs and EJBs
body: <p>I am trying to build an EJB in an EAR.  My EJB has dependencies on SNAPSHOTS.  So when I build the EAR my structure looks like this:  </p>
  
  <pre><code>my-ear-1.0.0-SNAPSHOT.ear
   + META-INF  
    - application.xml
    - MANIFEST.MF
   - my-ejb-1.0.0-SNAPSHOT.jar
   - third-party-lib-1.0.0-SNAPSHOT.jar
  </code></pre>
  
  <p>However, when using the maven-ejb-plugin to generate its MANIFEST.MF:</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-ejb-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.3&lt;/version&gt;
    &lt;configuration&gt;
      &lt;archive&gt;
        &lt;manifest&gt;
          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
        &lt;/manifest&gt;
      &lt;/archive&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>The problem I have, is the MANIFEST.MF lists the SNAPSHOT as how it appears in Nexus which is not how the maven-ear-plugin named it when building the ear.</p>
  
  <pre><code>Manifest-Version: 1.0
  Build-Jdk: 1.6.0_25
  Class-Path: third-party-lib-1.0.0-20121026.140152-21.jar
  </code></pre>
  
  <p>So of course I'm getting <em>ClassNotFoundException</em> s because the EJBs classpath is looking for a jar file that doesn't exist.  </p>
  
  <p>Basically I need to know either:</p>
  
  <ol>
  <li>How do I get the maven-ear-plugin to pull in the jars into the ear without the -SNAPSHOT format?</li>
  <li>How do I get the maven-ejb-plugin to use the -SNAPSHOT format in the MANIFEST.MF?</li>
  </ol>