Error using maven tomcat7 plugin - exception with context.xml
<p>With the following settings</p>

<pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
        &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.2&lt;/version&gt;
        &lt;configuration&gt;
          &lt;port&gt;9090&lt;/port&gt;
          &lt;path&gt;/&lt;/path&gt;
          &lt;contextFile&gt;src/main/resources/config/tomcat/context.xml&lt;/contextFile&gt;
          &lt;executions&gt;
                &lt;execution&gt;
                &lt;id&gt;start-tomcat&lt;/id&gt;
                &lt;phase&gt;pre-integration-test&lt;/phase&gt;
                &lt;goals&gt;                   
                    &lt;goal&gt;run&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
                &lt;id&gt;stop-tomcat&lt;/id&gt;
                &lt;phase&gt;post-integration-test&lt;/phase&gt;
                &lt;goals&gt;
                    &lt;goal&gt;shutdown&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
        &lt;/executions&gt;
 &lt;/plugin&gt;
</code></pre>

<p>When I ran </p>

<pre><code>mvn integration-test
</code></pre>

<p>I got the following error</p>

<pre><code>Caused by: javax.naming.NameNotFoundException: Name [url/btoconfig] is not bound
in this Context. Unable to find [url].
</code></pre>

<p>I do have this resource in context.xml (src/main/resources/config/tomcat/context.xml)</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Context&gt;  
    &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;

    &lt;Resource name="url/btoconfig" 
        auth="Container" 
        type="java.net.URL"
        maxActive="10" 
        initialSize="1" 
        factory="com.benny.naming.factory.URLFactory"
        url="file:///tools/BTO/config/DEV/bto.properties" /&gt;

&lt;/Context&gt;
</code></pre>

<p>I must be missing something silly, any hint would be much appreciated. </p>

<p>REF: application POM </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;com.benny.oms.bto&lt;/groupId&gt;
        &lt;artifactId&gt;bto&lt;/artifactId&gt;
        &lt;version&gt;1.03.00.00&lt;/version&gt;
    &lt;/parent&gt;
    &lt;artifactId&gt;application&lt;/artifactId&gt;
    &lt;name&gt;application&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;packaging&gt;war&lt;/packaging&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;xerces&lt;/groupId&gt;
            &lt;artifactId&gt;xercesImpl&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;!-- OMS artifacts --&gt;


        &lt;dependency&gt;
            &lt;groupId&gt;com.benny.oms&lt;/groupId&gt;
            &lt;artifactId&gt;oms-application&lt;/artifactId&gt;
            &lt;type&gt;war&lt;/type&gt;                    
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;com.benny.oms&lt;/groupId&gt;
            &lt;artifactId&gt;oms-application&lt;/artifactId&gt;
            &lt;type&gt;jar&lt;/type&gt;
            &lt;classifier&gt;classes&lt;/classifier&gt;
        &lt;/dependency&gt;

        &lt;!-- End OMS artifacts --&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;com.ibm&lt;/groupId&gt;
            &lt;artifactId&gt;mqjms&lt;/artifactId&gt;
            &lt;version&gt;${mq.version}&lt;/version&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
            &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;         
        &lt;/dependency&gt;

        &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;p6spy&lt;/groupId&gt;
            &lt;artifactId&gt;p6spy&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;jdbc&lt;/groupId&gt;
            &lt;artifactId&gt;jdbc-jconn3&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
            &lt;artifactId&gt;servlet-api&lt;/artifactId&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;jsp-api&lt;/artifactId&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;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;taglibs&lt;/groupId&gt;
            &lt;artifactId&gt;standard&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;!-- Spring --&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
            &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt;
        &lt;/dependency&gt;

&lt;!--
        &lt;dependency&gt; 
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt; 
          &lt;artifactId&gt;geronimo-jms_1.1_spec&lt;/artifactId&gt;
        &lt;/dependency&gt;
--&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring-jms&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;!-- Seeing if this is the problem
                As suggested by http://stackoverflow.com/questions/8218629/active-mq-helloworld-example-exception   
        &lt;dependency&gt;
            &lt;groupId&gt;javax&lt;/groupId&gt;
            &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
        &lt;/dependency&gt;
         --&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;javax.resource&lt;/groupId&gt;
            &lt;artifactId&gt;connector-api&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.jdom&lt;/groupId&gt;
            &lt;artifactId&gt;jdom&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;xalan&lt;/groupId&gt;
            &lt;artifactId&gt;xalan&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;xalan&lt;/groupId&gt;
            &lt;artifactId&gt;serializer&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.ws.commons.axiom&lt;/groupId&gt;
            &lt;artifactId&gt;axiom-api&lt;/artifactId&gt;
            &lt;exclusions&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
                    &lt;artifactId&gt;geronimo-activation_1.1_spec&lt;/artifactId&gt;
                &lt;/exclusion&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
                    &lt;artifactId&gt;geronimo-javamail_1.4_spec&lt;/artifactId&gt;
                &lt;/exclusion&gt;
            &lt;/exclusions&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.ws.commons.axiom&lt;/groupId&gt;
            &lt;artifactId&gt;axiom-impl&lt;/artifactId&gt;
            &lt;exclusions&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
                    &lt;artifactId&gt;geronimo-activation_1.1_spec&lt;/artifactId&gt;
                &lt;/exclusion&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
                    &lt;artifactId&gt;geronimo-javamail_1.4_spec&lt;/artifactId&gt;
                &lt;/exclusion&gt;
            &lt;/exclusions&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;jaxen&lt;/groupId&gt;
            &lt;artifactId&gt;jaxen&lt;/artifactId&gt;
            &lt;exclusions&gt;
                &lt;exclusion&gt;
                    &lt;artifactId&gt;maven-cobertura-plugin&lt;/artifactId&gt;
                    &lt;groupId&gt;maven-plugins&lt;/groupId&gt;
                &lt;/exclusion&gt;
                &lt;exclusion&gt;
                    &lt;artifactId&gt;maven-findbugs-plugin&lt;/artifactId&gt;
                    &lt;groupId&gt;maven-plugins&lt;/groupId&gt;
                &lt;/exclusion&gt;
                &lt;exclusion&gt;
                    &lt;artifactId&gt;com.ibm.icu&lt;/artifactId&gt;
                    &lt;groupId&gt;icu4j&lt;/groupId&gt;
                &lt;/exclusion&gt;
            &lt;/exclusions&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.ws.xmlschema&lt;/groupId&gt;
            &lt;artifactId&gt;xmlschema-core&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;com.sun.xml.stream&lt;/groupId&gt;
            &lt;artifactId&gt;sjsxp&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;!-- Spring Security --&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
            &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
            &lt;artifactId&gt;spring-xml&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
            &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
            &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;ch.ralscha&lt;/groupId&gt;
            &lt;artifactId&gt;extdirectspring&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
            &lt;artifactId&gt;spring-ws-security&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;javax.inject&lt;/groupId&gt;
            &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
        &lt;/dependency&gt;


        &lt;dependency&gt;
            &lt;groupId&gt;benny.extjs&lt;/groupId&gt;
            &lt;artifactId&gt;extjs-benny-jar&lt;/artifactId&gt;
            &lt;exclusions&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;xml-apis&lt;/groupId&gt;
                    &lt;artifactId&gt;xml-apis&lt;/artifactId&gt;
                &lt;/exclusion&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;javax.xml.stream&lt;/groupId&gt;
                    &lt;artifactId&gt;stax-api&lt;/artifactId&gt;
                &lt;/exclusion&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;stax&lt;/groupId&gt;
                    &lt;artifactId&gt;stax-api&lt;/artifactId&gt;
                &lt;/exclusion&gt;
            &lt;/exclusions&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;sweetdev&lt;/groupId&gt;
            &lt;artifactId&gt;sweetdev-spring-core&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;net.sf.dozer&lt;/groupId&gt;
            &lt;artifactId&gt;dozer&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;xmlunit&lt;/groupId&gt;
            &lt;artifactId&gt;xmlunit&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;com.sun.xml.stream.buffer&lt;/groupId&gt;
            &lt;artifactId&gt;streambuffer&lt;/artifactId&gt;
            &lt;exclusions&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;javax.activation&lt;/groupId&gt;
                    &lt;artifactId&gt;activation&lt;/artifactId&gt;
                &lt;/exclusion&gt;
            &lt;/exclusions&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;annogen&lt;/groupId&gt;
            &lt;artifactId&gt;annogen&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
            &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
        &lt;/dependency&gt;


        &lt;dependency&gt;
            &lt;groupId&gt;net.sf.ehcache&lt;/groupId&gt;
            &lt;artifactId&gt;ehcache-core&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.json&lt;/groupId&gt;
            &lt;artifactId&gt;json&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.milyn&lt;/groupId&gt;
            &lt;artifactId&gt;milyn-smooks-all&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;javax.mail&lt;/groupId&gt;
            &lt;artifactId&gt;mail&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt; 
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt; 
          &lt;artifactId&gt;geronimo-jms_1.1_spec&lt;/artifactId&gt; 
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.pdfbox&lt;/groupId&gt;
            &lt;artifactId&gt;pdfbox&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;com.benny.oms.bto&lt;/groupId&gt;
            &lt;artifactId&gt;dao&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;!--to share test code--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.benny.oms.bto&lt;/groupId&gt;
            &lt;artifactId&gt;model&lt;/artifactId&gt;
            &lt;version&gt;${project.version}&lt;/version&gt;&lt;!--$NO-MVN-MAN-VER$--&gt;
            &lt;type&gt;test-jar&lt;/type&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;com.benny.oms.bto&lt;/groupId&gt;
            &lt;artifactId&gt;interfaces&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
            &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;joda-time&lt;/groupId&gt;
            &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;SSO&lt;/groupId&gt;
            &lt;artifactId&gt;benny-SSO-Client&lt;/artifactId&gt;
        &lt;/dependency&gt;

    &lt;/dependencies&gt;


    &lt;build&gt;
        &lt;finalName&gt;bto&lt;/finalName&gt;

        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
                    &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
                    &lt;version&gt;2.2&lt;/version&gt;
                    &lt;configuration&gt;
                      &lt;port&gt;9090&lt;/port&gt;
                      &lt;path&gt;/&lt;/path&gt;
                      &lt;contextFile&gt;src/main/resources/config/tomcat/context.xml&lt;/contextFile&gt;
                      &lt;executions&gt;
                            &lt;execution&gt;
                            &lt;id&gt;start-tomcat&lt;/id&gt;
                            &lt;!-- &lt;phase&gt;pre-integration-test&lt;/phase&gt;  --&gt;
                            &lt;phase&gt;generate-resources&lt;/phase&gt;
                            &lt;goals&gt;                   
                                &lt;goal&gt;run&lt;/goal&gt;
                            &lt;/goals&gt;
                        &lt;/execution&gt;
                        &lt;execution&gt;
                            &lt;id&gt;stop-tomcat&lt;/id&gt;
                            &lt;phase&gt;post-integration-test&lt;/phase&gt;
                            &lt;goals&gt;
                                &lt;goal&gt;shutdown&lt;/goal&gt;
                            &lt;/goals&gt;
                        &lt;/execution&gt;
                      &lt;/executions&gt;
                    &lt;/configuration&gt;
             &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                &lt;version&gt;2.6&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                    &lt;nonFilteredFileExtensions&gt;
                        &lt;nonFilteredFileExtension&gt;xls&lt;/nonFilteredFileExtension&gt;
                    &lt;/nonFilteredFileExtensions&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;

            &lt;plugin&gt;
                &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
                &lt;version&gt;2.5&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;filesets&gt;
                        &lt;fileset&gt;
                            &lt;directory&gt;src/main/webapp/WEB-INF&lt;/directory&gt;
                            &lt;includes&gt;
                                &lt;include&gt;classes/**/*&lt;/include&gt;
                                &lt;include&gt;lib/**/*&lt;/include&gt;
                            &lt;/includes&gt;
                        &lt;/fileset&gt;
                    &lt;/filesets&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;

            &lt;plugin&gt;
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                &lt;version&gt;2.9&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;projectNameTemplate&gt;[artifactId]-[version]&lt;/projectNameTemplate&gt;
                    &lt;wtpmanifest&gt;true&lt;/wtpmanifest&gt;
                    &lt;wtpapplicationxml&gt;true&lt;/wtpapplicationxml&gt;
                    &lt;wtpversion&gt;2.0&lt;/wtpversion&gt;
                    &lt;manifest&gt;${basedir}/src/main/resources/META-INF/MANIFEST.MF&lt;/manifest&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;

            &lt;!-- plugin allows to set variable containing all lib Container will ignore 
                scanning lib inside --&gt;
            &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.9-benny&lt;/version&gt;
                &lt;executions&gt;
                    &lt;execution&gt;
                        &lt;goals&gt;
                            &lt;goal&gt;build-classpath&lt;/goal&gt;
                        &lt;/goals&gt;
                        &lt;phase&gt;generate-resources&lt;/phase&gt;
                        &lt;!-- &lt;goals&gt; &lt;goal&gt;build-classpath&lt;/goal&gt; &lt;/goals&gt; --&gt;
                        &lt;configuration&gt;
                            &lt;useAbsolutePaths&gt;false&lt;/useAbsolutePaths&gt;
                            &lt;outputProperty&gt;was.ignorescan.archives&lt;/outputProperty&gt;
                            &lt;includeScope&gt;runtime&lt;/includeScope&gt;
                            &lt;pathSeparator&gt;, &lt;/pathSeparator&gt;
                        &lt;/configuration&gt;
                    &lt;/execution&gt;
                &lt;/executions&gt;
            &lt;/plugin&gt;

            &lt;plugin&gt;
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                &lt;version&gt;2.6&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;archiveClasses&gt;true&lt;/archiveClasses&gt;
                    &lt;attachClasses&gt;true&lt;/attachClasses&gt;              
                    &lt;dependentWarIncludes&gt;**/common/**, **/resources/**&lt;/dependentWarIncludes&gt;              
                    &lt;packagingExcludes&gt;WEB-INF/lib/validation-api-1.0.0.GA.jar,WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar,WEB-INF/lib/geronimo-jms_1.1_spec-1.1.1.jar,WEB-INF/lib/mqjms-6.0.jar,WEB-INF/lib/xmlParserAPIs-2.6.2.jar&lt;/packagingExcludes&gt;
                    &lt;archive&gt;
                        &lt;manifest&gt;
                            &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                        &lt;/manifest&gt;
                        &lt;manifestEntries&gt;
                            &lt;Implementation-Version&gt;${project.version}&lt;/Implementation-Version&gt;
                            &lt;Ignore-Scanning-Archives&gt;${was.ignorescan.archives}&lt;/Ignore-Scanning-Archives&gt;
                        &lt;/manifestEntries&gt;
                    &lt;/archive&gt;
                    &lt;webResources&gt;
                        &lt;webResource&gt;
                            &lt;directory&gt;/src/main/webapp/WEB-INF&lt;/directory&gt;
                            &lt;includes&gt;
                                &lt;include&gt;web.xml&lt;/include&gt;
                            &lt;/includes&gt;
                            &lt;filtering&gt;true&lt;/filtering&gt;
                            &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt;
                        &lt;/webResource&gt;
                    &lt;/webResources&gt;

                    &lt;overlays&gt;
                        &lt;overlay&gt;
                          &lt;groupId&gt;com.benny.oms&lt;/groupId&gt;
                          &lt;artifactId&gt;oms-application&lt;/artifactId&gt;                       
                          &lt;excludes&gt;
                            &lt;exclude&gt;**/.xml&lt;/exclude&gt;
                            &lt;exclude&gt;WEB-INF/lib/validation-api-1.0.0.GA.jar&lt;/exclude&gt;
                            &lt;exclude&gt;WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar&lt;/exclude&gt;
                            &lt;exclude&gt;WEB-INF/lib/geronimo-jms_1.1_spec-1.1.1.jar&lt;/exclude&gt;
                            &lt;exclude&gt;WEB-INF/lib/mqjms-6.0.jar&lt;/exclude&gt;
                          &lt;/excludes&gt;
                        &lt;/overlay&gt;
                    &lt;/overlays&gt;

                &lt;/configuration&gt;
            &lt;/plugin&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;${maven-compiler-plugin.version}&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;source&gt;1.6&lt;/source&gt;
                    &lt;target&gt;1.6&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-surefire-plugin&lt;/artifactId&gt;
                &lt;version&gt;${maven-surefire-plugin.version}&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;excludes&gt;
                        &lt;exclude&gt;**/*ScreenTest.java&lt;/exclude&gt;
                    &lt;/excludes&gt;

                    &lt;classpathDependencyExcludes&gt;
                        &lt;!-- exclude code absent api --&gt;
                        &lt;classpathDependencyExclude&gt;javax.faces:javax.faces-api&lt;/classpathDependencyExclude&gt;
                    &lt;/classpathDependencyExcludes&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;

        &lt;/plugins&gt;
        &lt;resources&gt;
            &lt;resource&gt;
                &lt;directory&gt;src/main/java&lt;/directory&gt;
                &lt;includes&gt;
                    &lt;include&gt;**/*.xml&lt;/include&gt;
                    &lt;include&gt;**/*.properties&lt;/include&gt;
                &lt;/includes&gt;
            &lt;/resource&gt;
            &lt;resource&gt;
                &lt;directory&gt;src/main/resources&lt;/directory&gt;
                &lt;filtering&gt;true&lt;/filtering&gt;
                &lt;includes&gt;
                    &lt;include&gt;**/*.xml&lt;/include&gt;
                    &lt;include&gt;**/*.properties&lt;/include&gt;
                &lt;/includes&gt;
            &lt;/resource&gt;
        &lt;/resources&gt;
    &lt;/build&gt;    
&lt;/project&gt;
</code></pre>