title: maven ejb project - package with dependencies
body: <p>Is there a way to pack the dependencies of a maven ejb project in with the final jar? </p>
  
  <p>I typically use a separate ear project and include the ejb as a dependency - it will fill out the lib folder automatically this way. However, this seems a bit wasteful - to have a project just to build the ear. </p>
  
  <p>Right now I have:</p>
  
  <pre><code>&lt;artifactId&gt;projectname&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;ejb&lt;/packaging&gt;
  
          &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;ejbVersion&gt;3.1&lt;/ejbVersion&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
  
                          &lt;!-- without this, the datetime stamp unique id's will be appended to classpath items --&gt;
                          &lt;!-- see: http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Snapshot --&gt;
                          &lt;useUniqueVersions&gt;false&lt;/useUniqueVersions&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>Do I need to set the packaging type to ear? Can I include transitive dependencies in a standalone ejb jar? If I set it to ear, how do I config the ear plugin?</p>
  
  <p>Thanks in advance!</p>