title: Maven compile error "cannot find symbol" after any change to one project
body: <p>Well iam learning JEE with maven in the same time :p
  i have this structure of projects in netbeans
  ->core
  ->frontoffice</p>
  
  <p>frontoffice uses classes from core so i've added dependency in pom.xml like this :</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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.directmedia.onlinestore&lt;/groupId&gt;
      &lt;artifactId&gt;frontoffice&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;frontoffice&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;m.directmedia.onlinestore&lt;/groupId&gt;
              &lt;artifactId&gt;core&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
              &lt;version&gt;7.0&lt;/version&gt;
              &lt;scope&gt;provided&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;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;compilerArguments&gt;
                          &lt;endorseddirs&gt;${endorsed.dir}&lt;/endorseddirs&gt;
                      &lt;/compilerArguments&gt;
                  &lt;/configuration&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.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&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.6&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;validate&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${endorsed.dir}&lt;/outputDirectory&gt;
                              &lt;silent&gt;true&lt;/silent&gt;
                              &lt;artifactItems&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;javax&lt;/groupId&gt;
                                      &lt;artifactId&gt;javaee-endorsed-api&lt;/artifactId&gt;
                                      &lt;version&gt;7.0&lt;/version&gt;
                                      &lt;type&gt;jar&lt;/type&gt;
                                  &lt;/artifactItem&gt;
                              &lt;/artifactItems&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>core project pom.xml not changes.
  every thing works fine i can use classes of core project in frontoffice, however when i add something to core classes and clean &amp; build.. OK but when i do clean &amp; build on frontoffice project i got error of what i've added :</p>
  
  <pre><code>-------------------------------------------------------------
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[79,15] cannot find symbol
    symbol:   variable aa
    location: variable titre1 of type com.directmedia.onlinestore.core.entity.Work
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[80,15] cannot find symbol
    symbol:   variable aa
    location: variable titre2 of type com.directmedia.onlinestore.core.entity.Work
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[81,15] cannot find symbol
    symbol:   variable aa
    location: variable titre3 of type com.directmedia.onlinestore.core.entity.Work
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[101,27] cannot find symbol
    symbol:   variable aa
    location: variable oeuvre of type com.directmedia.onlinestore.core.entity.Work
  4 errors 
  -------------------------------------------------------------
  ------------------------------------------------------------------------
  BUILD FAILURE
  ------------------------------------------------------------------------
  Total time: 2.899 s
  Finished at: 2019-10-14T22:19:21+02:00
  Final Memory: 17M/196M
  ------------------------------------------------------------------------
  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project frontoffice: Compilation failure: Compilation failure:
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[79,15] cannot find symbol
  symbol:   variable aa
  location: variable titre1 of type com.directmedia.onlinestore.core.entity.Work
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[80,15] cannot find symbol
  symbol:   variable aa
  location: variable titre2 of type com.directmedia.onlinestore.core.entity.Work
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[81,15] cannot find symbol
  symbol:   variable aa
  location: variable titre3 of type com.directmedia.onlinestore.core.entity.Work
  com/directmedia/onlinestore/controller/CatalogueServlet.java:[101,27] cannot find symbol
  symbol:   variable aa
  location: variable oeuvre of type com.directmedia.onlinestore.core.entity.Work
  -&gt; [Help 1]
  
  To see the full stack trace of the errors, re-run Maven with the -e switch.
  Re-run Maven using the -X switch to enable full debug logging.
  
  For more information about the errors and possible solutions, please read the following articles:
  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>It's like the old version of classes still there and the compiler compile them not the modified ones.
  i've tried to clean project and netbeans cache but the same errors i don't know why this happen it seems to me illogic.</p>
  
  <p>Can you help me to figure out what is the problem ?</p>
  
  <p>To see my code and test that here is the repository : <a href="https://github.com/AmineJonahi/jee.maven" rel="nofollow noreferrer">https://github.com/AmineJonahi/jee.maven</a></p>