title: How to fix [Error] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.x (Happened while working on Spring Boot)
body: <h1>Problem</h1>
  
  <p>I decided to get <a href="http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#getting-started-introducing-spring-boot" rel="nofollow noreferrer">spring boot hello word</a> example to work with Java 1.8 but an annoying dependency issues. In the answer section I explain what solved my problem as well as some hints on how to bring everything on your machine up to date.
  The error I was getting was:</p>
  
  <pre><code>[ERROR] realm =    plugin&gt;org.apache.maven.plugins:maven-compiler-plugin:3.x
  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  [ERROR] urls[0] = file:/Users/xxx/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar
  [ERROR] urls[1] = file:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
  [ERROR] urls[2] = file:/Users/xxx/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
  [ERROR] urls[3] = file:/Users/xxx/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
  [ERROR] urls[4] = file:/Users/xxx/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.1/maven-shared-incremental-1.1.jar
  [ERROR] urls[5] = file:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
  [ERROR] urls[6] = file:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.2/plexus-compiler-api-2.2.jar
  [ERROR] urls[7] = file:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.2/plexus-compiler-manager-2.2.jar
  [ERROR] urls[8] = file:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.2/plexus-compiler-javac-2.2.jar
  [ERROR] urls[9] = file:/Users/xxx/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
  [ERROR] urls[10] = file:/Users/xxx/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
  [ERROR] urls[11] = file:/Users/xxx/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
  [ERROR] urls[12] = file:/Users/xxx/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
  [ERROR] urls[13] = file:/Users/xxx/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
  </code></pre>
  
  <hr>
  
  <h1>Solutions that didn't work</h1>
  
  <p>A lot of the threads were suggesting removing the ~/.m2/ repositories like <a href="https://stackoverflow.com/questions/17223536/failed-to-execute-goal-org-apache-maven-pluginsmaven-compiler-plugin2-3-2comp">here</a> but it did not solve my problem.</p>
  
  <p>Some others said that this is due to the Java 1.8 and it works perfectly for them with Java 1.7! But couldn't believe them as it did not make sense. And I really wanted to get this simple example to work with Java 8.</p>
  
  <h1>Solution summary</h1>
  
  <p>It was a dependency conflict but had nothing to do with the Java version or the repositories under .m2 folder for me. </p>
  
  <p>The source of the error was a dependency conflict that was caused <code>plugin&gt;org.apache.maven.plugins:maven-compiler-plugin:3.x</code>. </p>
  
  <hr>
  
  <h1>Other related sources</h1>
  
  <p>Other questions on stackoverflow that are similar but didn't solve my problem with spring boot are as follows:</p>
  
  <p>1- <a href="https://stackoverflow.com/questions/14736283/maven-build-error-failed-to-execute-goal-missing-a-class">maven-build-error-failed-to-execute-goal-missing-a-class</a></p>
  
  <p>2- <a href="https://stackoverflow.com/questions/17223536/failed-to-execute-goal-org-apache-maven-pluginsmaven-compiler-plugin2-3-2comp">failed-to-execute-goal-org-apache-maven-pluginsmaven-compiler-plugin2-3-2comp</a></p>
  
  <p>3- <a href="https://stackoverflow.com/questions/20666475/maven-release-plugin-issue-failed-to-execute-goal-org-apache-maven-pluginsmav">maven-release-plugin-issue-failed-to-execute-goal-org-apache-maven-pluginsmav</a></p>
  
  <p>4- <a href="https://stackoverflow.com/questions/6044026/maven-archetype-problem">maven-archetype-problem</a></p>