title: Failed to execute goal maven-compiler-plugin 3.8.0 - org/codehaus/plexus/compiler/manager/NoSuchCompilerException
body: <p>i am using Maven 3.5.3 with JDK 1.8. When i try to compile from cmd my project with <code>mvn clean compile</code>, the console return the following errors:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------&lt; com.dadopay:DadopayDAOAggregator &gt;------------------
  [INFO] Building DadopayDAOAggregator 1.0.0
  [INFO] --------------------------------[ jar ]---------------------------------
  [INFO]
  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ DadopayDAOAggregator ---
  [INFO] Deleting C:\Users\..\Documents\Workspace\Dadopay_DAO_Aggregator\target
  [INFO]
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DadopayDAOAggregator ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 1 resource
  [INFO]
  [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ DadopayDAOAggregator ---
  [WARNING] Error injecting: org.apache.maven.plugin.compiler.CompilerMojo
  java.lang.NoClassDefFoundError: org/codehaus/plexus/compiler/manager/NoSuchCompilerException
     ...
      Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.compiler.manager.NoSuchCompilerException
    ...
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 13.753 s
      [INFO] Finished at: 2018-10-30T12:02:58+01:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project DadopayDAOAggregator: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile: org/codehaus/plexus/compiler/manager/NoSuchCompilerException
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin&gt;org.apache.maven.plugins:maven-compiler-plugin:3.8.0
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/../.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.8.0/maven-compiler-plugin-3.8.0.jar
      [ERROR] urls[1] = file:/../.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
      [ERROR] urls[2] = file:/../.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
      [ERROR] urls[3] = file:/../.m2/repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar
      [ERROR] urls[4] = file:/../.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
      [ERROR] urls[5] = file:/../.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
      [ERROR] urls[6] = file:/../.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
      [ERROR] urls[7] = file:/../.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      [ERROR] urls[8] = file:/../.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      [ERROR] urls[9] = file:/../.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
      [ERROR] urls[10] = file:/../.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
      [ERROR] urls[11] = file:/../.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.1/maven-shared-incremental-1.1.jar
      [ERROR] urls[12] = file:/../.m2/repository/org/codehaus/plexus/plexus-java/0.9.10/plexus-java-0.9.10.jar
      [ERROR] urls[13] = file:/../.m2/repository/org/ow2/asm/asm/6.2/asm-6.2.jar
      [ERROR] urls[14] = file:/../.m2/repository/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar
      [ERROR] urls[15] = file:/../.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.8.4/plexus-compiler-api-2.8.4.jar
      [ERROR] urls[16] = file:/../.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.8.4/plexus-compiler-manager-2.8.4.jar
      [ERROR] urls[17] = file:/../.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.8.4/plexus-compiler-javac-2.8.4.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
      [ERROR]
      [ERROR] -----------------------------------------------------
      [ERROR] : org.codehaus.plexus.compiler.manager.NoSuchCompilerException
      [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/PluginContainerException
  </code></pre>
  
  <p>My pom:</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.dadopay&lt;/groupId&gt;
      &lt;artifactId&gt;DadopayDAOAggregator&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;name&gt;DadopayDAOAggregator&lt;/name&gt;
      &lt;build&gt;
          &lt;pluginManagement&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.8.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;1.8&lt;/source&gt;
                          &lt;target&gt;1.8&lt;/target&gt;
                          &lt;scope&gt;test&lt;/scope&gt;
                      &lt;/configuration&gt;
  
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;4.3.1RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.17&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;4.3.1RELEASE&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;4.3.1RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.oracle&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc14&lt;/artifactId&gt;
              &lt;version&gt;10.2.0.3.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
              &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
              &lt;version&gt;1.4&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;artifactId&gt;xercesImpl&lt;/artifactId&gt;
                      &lt;groupId&gt;xerces&lt;/groupId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>I already saw some post like <a href="https://stackoverflow.com/questions/17223536/failed-to-execute-goal-org-apache-maven-pluginsmaven-compiler-plugin2-3-2comp">this </a> and <a href="https://stackoverflow.com/questions/13936833/maven-compiler-error">this</a>; i tried to delete all .m2 folder, change the source inside pom and check if all the jar reported as urls are present in my repository (and all was there).</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT</strong> - mvn -v result:</p>
  
  <pre><code>Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
  Maven home: C:\Program Files\maven\bin\..
  Java version: 1.8.0_171, vendor: Oracle Corporation
  Java home: C:\Program Files\Java\jdk1.8.0_171\jre
  Default locale: it_IT, platform encoding: Cp1252
  OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
  </code></pre>
  
  <p>My Project structure:</p>
  
  <pre><code>src
     main
          java
               it.noatel.data_access.bean
               it.noatel.data_access.dao
               it.noatel.data_access.commons
               it.noatel.data_access.dao.impl.jdbc
               it.noatel.data_access.dao.impl.commons
               it.noatel.data_access.util
  </code></pre>