title: How to change the location of compiled code to WAR file in maven
body: <p>I have a project where I need to put the complied source code into WAR file instead of default location target/classses folder in maven.</p>
  
  <p>I tried a lot of things but it in not working does anyone has any idea what can be done here.</p>
  
  <p><a href="http://fusesource.com/docs/esbent/7.0/esb_deploy_osgi/BuildWar-Modify.html#BuildWar-Modify-WebInf" rel="nofollow">http://fusesource.com/docs/esbent/7.0/esb_deploy_osgi/BuildWar-Modify.html#BuildWar-Modify-WebInf</a></p>
  
  <p>I tried the above link and its help but it is not working.</p>
  
  <p>Pom.xml:</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;com.Avizva.FBVision&lt;/groupId&gt;
    &lt;artifactId&gt;Enrollment_GUID&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;name&gt;Enrollment_GUID&lt;/name&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;${basedir}/src&lt;/sourceDirectory&gt;
  &lt;resources&gt;
        &lt;resource&gt;
          &lt;directory&gt;${basedir}/src&lt;/directory&gt;
          &lt;includes&gt;
          &lt;include&gt;**/*.properties&lt;/include&gt;
           &lt;include&gt;**/*.java&lt;/include&gt;
          &lt;/includes&gt;
  
        &lt;/resource&gt;
      &lt;/resources&gt;
      &lt;plugins&gt;
  
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.1&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;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.3&lt;/version&gt;
          &lt;configuration&gt;
          &lt;warSourceDirectory&gt;${basedir}/WebContent&lt;/warSourceDirectory&gt;
            &lt;warName&gt;Enrollment_GUID&lt;/warName&gt;
            &lt;packagingIncludes&gt;WEB-INF/lib/*.jar,WEB-INF/wsdl/*.xsd,WEB-INF/wsdl/*.wsdl,WEB-INF/properties/*.properties,**/*.xml&lt;/packagingIncludes&gt;
           &lt;webResources&gt;
              &lt;resource&gt;
                &lt;directory&gt;${basedir}/src&lt;/directory&gt;
                &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt;
              &lt;/resource&gt;
            &lt;/webResources&gt;
  
            &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.4&lt;/version&gt;
        &lt;configuration&gt;
          &lt;encoding&gt;UTF-8&lt;/encoding&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
      &lt;/plugins&gt;
  
    &lt;/build&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-1.2-api&lt;/artifactId&gt;
          &lt;version&gt;2.0-rc1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.kie.modules&lt;/groupId&gt;
          &lt;artifactId&gt;org-apache-commons-lang3&lt;/artifactId&gt;
          &lt;version&gt;6.1.0.CR1&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-jdk14&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;joda-time&lt;/groupId&gt;
      &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
      &lt;version&gt;2.3&lt;/version&gt;
  &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.directory.studio&lt;/groupId&gt;
          &lt;artifactId&gt;org.apache.commons.lang&lt;/artifactId&gt;
          &lt;version&gt;2.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
          &lt;version&gt;1.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-asm&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-expression&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;3.0.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;net.sf.dozer&lt;/groupId&gt;
      &lt;artifactId&gt;dozer&lt;/artifactId&gt;
      &lt;version&gt;5.3.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
          &lt;artifactId&gt;axis2-adb&lt;/artifactId&gt;
          &lt;version&gt;1.6.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
          &lt;artifactId&gt;axis2-kernel&lt;/artifactId&gt;
          &lt;version&gt;1.6.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
      &lt;artifactId&gt;axis2-transport-local&lt;/artifactId&gt;
      &lt;version&gt;1.6.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
      &lt;artifactId&gt;axis2-transport-http&lt;/artifactId&gt;
      &lt;version&gt;1.6.2&lt;/version&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;version&gt;1.2.13&lt;/version&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;version&gt;1.2.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;antlr&lt;/groupId&gt;
          &lt;artifactId&gt;antlr&lt;/artifactId&gt;
          &lt;version&gt;2.7.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
          &lt;version&gt;1.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;org.apache.ws.schema&lt;/groupId&gt;
      &lt;artifactId&gt;XmlSchema&lt;/artifactId&gt;
      &lt;version&gt;1.4.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpclient-cache&lt;/artifactId&gt;
          &lt;version&gt;4.2.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpcore&lt;/artifactId&gt;
          &lt;version&gt;4.2.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpmime&lt;/artifactId&gt;
          &lt;version&gt;4.2.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
          &lt;version&gt;4.2.3&lt;/version&gt;
      &lt;/dependency&gt;
  
  
    &lt;/dependencies&gt;
  
    &lt;version&gt;1&lt;/version&gt;
  &lt;/project&gt;
  </code></pre>