title: Java class files are not generated in war file
body: <p>I am trying to deploy project in tomcat.
  After deploying my war file,it doesn't work.While clicking link shows 404 error.</p>
  
  <p>webapps--> project-->WEB-INF-->classes-->only files from src/main/resources were generated.</p>
  
  <p>Class files from src/main/java were not generated in war file.I think,it is not compiling the subpackages in src/main/java.I have all java class files in subpackages. 
  Please help me,if anyone knows.</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;prerequisites&gt;
          &lt;maven&gt;3.0.0&lt;/maven&gt;
      &lt;/prerequisites&gt;
  
      &lt;groupId&gt;com.nestone.deals&lt;/groupId&gt;
      &lt;artifactId&gt;dealcatcher&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;Deal Catcher&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;dropwizard.version&gt;0.9.0-rc4&lt;/dropwizard.version&gt;
          &lt;mainClass&gt;com.nestone.deals.DealCatcherApplication&lt;/mainClass&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
              &lt;artifactId&gt;dropwizard-core&lt;/artifactId&gt;
              &lt;version&gt;${dropwizard.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
                      &lt;artifactId&gt;jackson-datatype-guava&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.5.0-b01&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
              &lt;artifactId&gt;dropwizard-forms&lt;/artifactId&gt;
              &lt;version&gt;${dropwizard.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
              &lt;artifactId&gt;dropwizard-assets&lt;/artifactId&gt;
              &lt;version&gt;${dropwizard.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
              &lt;artifactId&gt;dropwizard-views&lt;/artifactId&gt;
              &lt;version&gt;${dropwizard.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
              &lt;artifactId&gt;dropwizard-configuration&lt;/artifactId&gt;
              &lt;version&gt;${dropwizard.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
              &lt;artifactId&gt;dropwizard-views-mustache&lt;/artifactId&gt;
              &lt;version&gt;${dropwizard.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
              &lt;version&gt;2.6.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.6.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
              &lt;version&gt;2.6.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-datatype-guava&lt;/artifactId&gt;
              &lt;version&gt;2.6.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
              &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;version&gt;18.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
              &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
              &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
              &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-chrome-driver&lt;/artifactId&gt;
              &lt;version&gt;2.49.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-htmlunit-driver&lt;/artifactId&gt;
              &lt;version&gt;2.49.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-firefox-driver&lt;/artifactId&gt;
              &lt;version&gt;2.49.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;eu.bitwalker&lt;/groupId&gt;
              &lt;artifactId&gt;UserAgentUtils&lt;/artifactId&gt;
              &lt;version&gt;1.19&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.github.bonigarcia&lt;/groupId&gt;
              &lt;artifactId&gt;webdrivermanager&lt;/artifactId&gt;
              &lt;version&gt;1.3.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.knowm&lt;/groupId&gt;
              &lt;artifactId&gt;sundial&lt;/artifactId&gt;
              &lt;version&gt;2.1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi&lt;/artifactId&gt;
              &lt;version&gt;3.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml-schemas&lt;/artifactId&gt;
              &lt;version&gt;3.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
              &lt;artifactId&gt;xmlbeans&lt;/artifactId&gt;
              &lt;version&gt;2.4.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;dom4j&lt;/groupId&gt;
              &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
              &lt;version&gt;1.6.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;xml-apis&lt;/groupId&gt;
              &lt;artifactId&gt;xml-apis&lt;/artifactId&gt;
              &lt;version&gt;1.4.01&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
  
      &lt;sourceDirectory&gt;${basedir}/src/main/java&lt;/sourceDirectory&gt;
          &lt;plugins&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;WebContent&lt;/warSourceDirectory&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.7&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;createDependencyReducedPom&gt;true&lt;/createDependencyReducedPom&gt;
                      &lt;transformers&gt;
                          &lt;transformer
                              implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /&gt;
                          &lt;transformer
                              implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                              &lt;mainClass&gt;${mainClass}&lt;/mainClass&gt;
                          &lt;/transformer&gt;
                      &lt;/transformers&gt;
                      &lt;!-- exclude signed Manifests --&gt;
                      &lt;filters&gt;
                          &lt;filter&gt;
                              &lt;artifact&gt;*:*&lt;/artifact&gt;
                              &lt;excludes&gt;
                                  &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                                  &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                                  &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                              &lt;/excludes&gt;
                          &lt;/filter&gt;
                      &lt;/filters&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;mainClass&gt;${mainClass}&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1.2&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-sources&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.8.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-javadocs&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;reportPlugins&gt;
                          &lt;plugin&gt;
                              &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
                              &lt;version&gt;2.4&lt;/version&gt;
                              &lt;configuration&gt;
                                  &lt;dependencyLocationsEnabled&gt;false&lt;/dependencyLocationsEnabled&gt;
                                  &lt;dependencyDetailsEnabled&gt;false&lt;/dependencyDetailsEnabled&gt;
                              &lt;/configuration&gt;
                          &lt;/plugin&gt;
                          &lt;plugin&gt;
                              &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
                              &lt;version&gt;2.8.1&lt;/version&gt;
                          &lt;/plugin&gt;
                      &lt;/reportPlugins&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TmMbG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TmMbG.png" alt="enter image description here"></a></p>