title: Packaging a WAR file in an EAR so that WAR dependencies are available
body: <p>I am adding a WAR module [my-web-app] to an existing EAR application [my-ear-app] that currently contains EJB modules only. The WAR module is a RESTful app written in Spring MVC 3.0.<br>
  The apps are maven 2.x apps.
  When I run the EAR app on WebLogic 10.3.2 it fails to publish the WAR module that I added.
  I am running this in WebLogic 10.3.2 from Eclipse Helios.<br>
  I have tried the app fuse warpath config in the pom but that didn't work. I also looked at the skinny wars approach. I added links to this relevant material at end of the post.  </p>
  
  <p>I can't seem to get past the missing oxm lib error - NoClassDefFoundError:org/springframework/oxm/Marshaller.</p>
  
  <p>The error happens when an attempt is made to publish the EAR app to the WL app server.</p>
  
  <p>The published EAR deploys as:</p>
  
  <ul>
  <li>META-INF\application.xml</li>
  <li>META-INF\MANIFEST.MF</li>
  <li>META-INF\weblogic-application.xml </li>
  <li>my-web-app.war</li>
  <li>.beabuild.txt</li>
  </ul>
  
  <p>The published WAR module from the EAR extracts as:</p>
  
  <ul>
  <li>WEB-INF\lib\jstl-1.2.jar</li>
  <li>WEB-INF\lib\spring-webmvc-3.0.5.RELEASE.jar</li>
  </ul>
  
  <p>For comparison, the maven packaged WAR from the web app extracts as:</p>
  
  <ul>
  <li>META-INF\MANIFEST.MF</li>
  <li>WEB-INF\classes</li>
  <li>WEB-INF\jsp</li>
  <li>WEB-INF\lib (has all WAR dependencies)</li>
  <li>WEB-INF\spring</li>
  <li>web.xml</li>
  </ul>
  
  <p>This is a partial error trace: </p>
  
  <pre><code>java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
      at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper$DeploymentProgressListener.watch(WlsJ2EEDeploymentHelper.java:1559)
      at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.deploy (WlsJ2EEDeploymentHelper.java:484)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishWeblogicModules (WeblogicServerBehaviour.java:1419)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer    (WeblogicServerBehaviour.java:861)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce (WeblogicServerBehaviour.java:655)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish (WeblogicServerBehaviour.java:522)
      at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish (ServerBehaviourDelegate.java:775)
      at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2888)
      at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: weblogic.application.ModuleException: [HTTP:101216]Servlet: "mywebapp" failed to preload on startup in Web application: "mywebapp". java.lang.NoClassDefFoundError: org/springframework/oxm/Marshaller
          at java.lang.Class.getDeclaredConstructors0(Native Method)
          at java.lang.Class.privateGetDeclaredConstructors(Class.java:389)
          at java.lang.Class.getDeclaredConstructors(Class.java:1836)
          at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determinCCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:227)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:930)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInsance (AbstractAutowireCapableBeanFactory.java:903)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:485)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:456)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject (AbstractBeanFactory.java:291)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactor.java:288)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:580)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
          at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:425)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext (FrameworkServlet.java:442)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext (FrameworkServlet.java:458)
          at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext (FrameworkServlet.java:339)
          at org.springframework.web.servlet.FrameworkServlet.initServletBean (FrameworkServlet.java:306)
          at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
          at javax.servlet.GenericServlet.init(GenericServlet.java:241)
          at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run (StubSecurityHelper.java:283)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
          at weblogic.servlet.internal.StubSecurityHelper.createServlet (StubSecurityHelper.java:64)
          at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance (StubLifecycleHelper.java:58)
          at weblogic.servlet.internal.StubLifecycleHelper.&lt;init&gt;(StubLifecycleHelper.java:48)
          at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
          at weblogic.servlet.internal.WebAppServletContext.preloadServlet (WebAppServletContext.java:1915)
          at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup (WebAppServletContext.java:1889)
          at weblogic.servlet.internal.WebAppServletContext.preloadResources (WebAppServletContext.java:1807)
          at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
          at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
          at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
          at weblogic.application.internal.flow.ModuleStateDriver$3.next (ModuleStateDriver.java:425)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
          at weblogic.application.internal.flow.ModuleStateDriver.start (ModuleStateDriver.java:119)
          at weblogic.application.internal.flow.ScopedModuleDriver.start (ScopedModuleDriver.java:200)
          at weblogic.application.internal.flow.ModuleListenerInvoker.start (ModuleListenerInvoker.java:247)
          at weblogic.application.internal.flow.ModuleStateDriver$3.next (ModuleStateDriver.java:425)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
          at weblogic.application.internal.flow.ModuleStateDriver.start (ModuleStateDriver.java:119)
          at weblogic.application.internal.flow.StartModulesFlow.activate (StartModulesFlow.java:27)
          at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
          at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
          at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
  ... 
  </code></pre>
  
  <p>Below is the WAR module's org.eclipse.wst.common.component file, it has two EJB dependencies:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project-modules id="moduleCoreId" project-version="1.5.0"&gt;
  &lt;wb-module deploy-name="my-web-app"&gt;       
      &lt;wb-resource deploy-path="/" source-path="/src/main/webapp"/&gt;
      &lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/&gt;
      &lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/&gt;
      &lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/&gt;
      &lt;dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/ejb-module-1/ejb-module1"&gt;
          &lt;dependency-type&gt;uses&lt;/dependency-type&gt;
      &lt;/dependent-module&gt;
      &lt;dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/ejb-module-2/ejb-module2"&gt;
          &lt;dependency-type&gt;uses&lt;/dependency-type&gt;
      &lt;/dependent-module&gt;
  &lt;property name="java-output-path" value="/my-web-app/target/classes"/&gt;
      &lt;property name="context-root" value="my-web-app"/&gt;
  &lt;/wb-module&gt;
  </code></pre>
  
  <p></p>
  
  <p>Below is the EAR module's org.eclipse.wst.common.component file. The EAR module has the web module dependency as well as many EJB dependencies. The EAR org.eclipse.wst.common.component file shows only two EJB dependencies to make it easier to read. The first EJB dependency type is EJB modules at the project root level and the second EJB dependency type is EJB modules written to the lib/ folder. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;project-modules id="moduleCoreId" project-version="1.5.0"&gt; 
          &lt;wb-module deploy-name="my-ejb-module"&gt; 
              &lt;wb-resource deploy-path="/" source-path="/EarContent"/&gt; 
              &lt;dependent-module archiveName="ejb-module-A.jar" deploy-path="/"   handle="module:/resource/ejbmoduleA/ejbmoduleA"&gt; 
                  &lt;dependent-object/&gt; 
                  &lt;dependency-type&gt;uses&lt;/dependency-type&gt; 
              &lt;/dependent-module&gt; 
              &lt;dependent-module archiveName="ejb-module-B-SNAPSHOT.jar" deploy-path="/lib" handle="module:/resource/ejb-module-B-SNAPSHOT/ejb-module-B-SNAPSHOT"&gt;
                  &lt;dependent-object/&gt; 
                  &lt;dependency-type&gt;uses&lt;/dependency-type&gt; 
               &lt;/dependent-module&gt; 
              &lt;dependent-module archiveName="my-web-app.war" deploy-path="/" handle="module:/resource/my-web-app/my-web-app"&gt; 
                  &lt;dependent-object/&gt; 
                  &lt;dependency-type&gt;uses&lt;/dependency-type&gt;
               &lt;/dependent-module&gt; 
       &lt;/wb-module&gt;
  </code></pre>
  
  <p></p>
  
  <p>Below is the pom.xml file for the EAR app:</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/maven-v4_0_0.xsd"&gt;   
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.ear.app&lt;/groupId&gt;
  &lt;artifactId&gt;my-ear-app&lt;/artifactId&gt; 
  &lt;packaging&gt;ear&lt;/packaging&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  
  &lt;/properties&gt;
      &lt;spring.version&gt;3.0.5.RELEASE&lt;/spring.version&gt;
      &lt;slf4j.version&gt;1.6.1&lt;/slf4j.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;        
          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
          &lt;artifactId&gt;ejb-module-W&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
          &lt;artifactId&gt;ejb-module-X&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;        
          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
          &lt;artifactId&gt;ejb-module-Y&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
          &lt;artifactId&gt;ejb-module-Z&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;com.web.app&lt;/groupId&gt;
              &lt;artifactId&gt;my-web-app&lt;/artifactId&gt;
              &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
              &lt;type&gt;war&lt;/type&gt;
      &lt;/dependency&gt;
  &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-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.0.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.5&lt;/source&gt;
                  &lt;target&gt;1.5&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&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.4&lt;/version&gt;
              &lt;configuration&gt;
              &lt;generateApplicationXml&gt;false&lt;/generateApplicationXml&gt;
                  &lt;earSourceDirectory&gt;${basedir}/src/main/application&lt;/earSourceDirectory&gt;
                  &lt;earSourceIncludes&gt;META-INF/**&lt;/earSourceIncludes&gt;
                  &lt;defaultJavaBundleDir&gt;APP-INF/lib&lt;/defaultJavaBundleDir&gt;
                  &lt;version&gt;5&lt;/version&gt;
                  &lt;modules&gt;                                           &lt;jarModule&gt; 
                          &lt;groupId&gt;log4j&lt;/groupId&gt;
                          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                    
                      &lt;/jarModule&gt;    
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
                          &lt;artifactId&gt;ejb-module-M&lt;/artifactId&gt;                           
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                        
                      &lt;/jarModule&gt;            
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
                          &lt;artifactId&gt;ejb-module-N&lt;/artifactId&gt;                           
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                        
                      &lt;/jarModule&gt;            
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
                          &lt;artifactId&gt;ejb-module-O&lt;/artifactId&gt;                           
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                        
                      &lt;/jarModule&gt;
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
                          &lt;artifactId&gt;ejb-module-P&lt;/artifactId&gt;                               
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;
                      &lt;/jarModule&gt;
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;org.codehaus.castor&lt;/groupId&gt;
                          &lt;artifactId&gt;castor-core&lt;/artifactId&gt;                
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                        
                      &lt;/jarModule&gt;
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;org.codehaus.castor&lt;/groupId&gt;
                          &lt;artifactId&gt;castor-xml&lt;/artifactId&gt;             
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                        
                      &lt;/jarModule&gt;
                      &lt;jarModule&gt;             
                          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;        
                          &lt;includeInApplicationXml&gt;false&lt;/includeInApplicationXml&gt;                        
                      &lt;/jarModule&gt;            
                  &lt;/modules&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;
      &lt;/plugins&gt;  
      &lt;finalName&gt;MY EAR APP&lt;/finalName&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is the web module's pom.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.web.app&lt;/groupId&gt;
  &lt;artifactId&gt;my-web-app&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;   
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;/properties&gt;
      &lt;spring.version&gt;3.0.5.RELEASE&lt;/spring.version&gt;
      &lt;slf4j.version&gt;1.6.1&lt;/slf4j.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;${slf4j.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
          &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.15&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.mail&lt;/groupId&gt;
                  &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.jms&lt;/groupId&gt;
                  &lt;artifactId&gt;jms&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jdmk&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxtools&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jmx&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxri&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;4.0.0.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&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;com.ejb.module&lt;/groupId&gt;
          &lt;artifactId&gt;ejb-module-1&lt;/artifactId&gt;
          &lt;version&gt;1.3.0-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.ejb.module&lt;/groupId&gt;
          &lt;artifactId&gt;ejb-module-2&lt;/artifactId&gt;
          &lt;version&gt;1.3.0-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.7&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &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-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.0.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.5&lt;/source&gt;
                  &lt;target&gt;1.5&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;install&lt;/id&gt;
                      &lt;phase&gt;install&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;sources&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
           &lt;plugin&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;classpathPrefix&gt;lib/&lt;/classpathPrefix&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>References:</p>
  
  <ol>
  <li><a href="http://docs.codehaus.org/display/MAVENUSER/Solving+the+Skinny+Wars+problem" rel="nofollow noreferrer">http://docs.codehaus.org/display/MAVENUSER/Solving+the+Skinny+Wars+problem</a></li>
  <li><a href="https://stackoverflow.com/questions/1769586/maven-war-dependency">Maven WAR dependency</a>
  This one is similar to my problem and I attempted to use it to solve my issue but to no avail. It has an example of using warpath from appfuse.</li>
  </ol>