title: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
body: <p>Given the below 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.myApp&lt;/groupId&gt;
      &lt;artifactId&gt;malloc&lt;/artifactId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&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;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;project&lt;/id&gt;
              &lt;url&gt;file:///${basedir}/lib&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.myApp&lt;/groupId&gt;
              &lt;artifactId&gt;myApp.core&lt;/artifactId&gt;
              &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;/dependency&gt;
          ... //other dependencies
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src&lt;/directory&gt;
                  &lt;excludes&gt;
                      &lt;exclude&gt;**/*.java&lt;/exclude&gt;
                  &lt;/excludes&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;plugins&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.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                           &lt;/manifest&gt;
                           &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt;
                      &lt;/archive&gt;
                      &lt;webResources&gt;
                           &lt;webResource&gt; 
                             &lt;directory&gt;${project.build.directory}/WebContent/WEB-INF&lt;/directory&gt; 
                             &lt;includes&gt; 
                               &lt;include&gt;web.xml&lt;/include&gt; 
                             &lt;/includes&gt; 
                             &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt; 
                             &lt;filtering&gt;true&lt;/filtering&gt; 
                           &lt;/webResource&gt;
                      &lt;/webResources&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;version&gt;2.10&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                      &lt;id&gt;copy-dependencies&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/WebContent/WEB-INF/lib&lt;/outputDirectory&gt;
                              &lt;includeScope&gt;runtime&lt;/includeScope&gt;
                              &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt;
                              &lt;overWriteSnapshots&gt;false&lt;/overWriteSnapshots&gt;
                              &lt;overWriteIfNewer&gt;true&lt;/overWriteIfNewer&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&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.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And the following project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/w0Pn2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w0Pn2.png" alt="enter image description here"></a></p>
  
  <p>I expect the maven-dependency-plugin would copy all the dependencies to the WebContent/WEB-INF/lib but when I run</p>
  
  <pre><code>mvn clean install
  </code></pre>
  
  <p>The following error is generated:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO] 
  [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building api-malloc 0.0.1
  [INFO] ------------------------------------------------------------------------
  [WARNING] The POM for com.oracle:ojdbc6:jar:10.2.0.4.0 is missing, no dependency information available
  [INFO] 
  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ api-malloc ---
  [INFO] Deleting C:\Development\malloc\target
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ api-malloc ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 1 resource
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ api-malloc ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 8 source files to C:\Development\malloc\target\classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /C:/Development/malloc/src/com/myApp/api/malloc/dto/RegionTypeDTO.java:[3,34] package com.myApp.api.core.dto does not exist
  [ERROR] /C:/Development/malloc/src/com/myApp/api/malloc/dto/RegionTypeDTO.java:[5,39] cannot find symbol
    symbol: class IDTO
  [INFO] 26 errors 
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 4.209 s
  [INFO] Finished at: 2015-11-26T15:33:40-05:00
  [INFO] Final Memory: 21M/227M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project malloc: Compilation failure: Compilation failure:
  [ERROR] /C:/Development/malloc/src/com/myApp/api/malloc/dto/RegionTypeDTO.java:[3,34] package com.myApp.api.core.dto does not exist
  [ERROR] /C:/Development/malloc/src/com/myApp/api/malloc/dto/RegionTypeDTO.java:[5,39] cannot find symbol
  [ERROR] symbol: class IDTO
  
  [ERROR] location: class com.myApp.api.malloc.controllers.TestController
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>I noticed the WEB-INF/lib folder is always empty, maven dependencies are not copied over.</p>
  
  <p>I am suspecting the copy-dependencies plugin didn't get run before the compile stage but I can't really figure out - anything that I missed?</p>