title: Maven project won't compile with Java 8 on OSX
body: <p>I have the following 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/maven-v4_0_0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
          &lt;groupId&gt;com.github.spring-mvc-archetypes&lt;/groupId&gt;
          &lt;artifactId&gt;spring-mvc-quickstart&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;maven-archetype&lt;/packaging&gt;
          &lt;name&gt;Spring MVC Maven Archetype: Quickstart&lt;/name&gt;
    &lt;description&gt;Archetype for creating Spring MVC 4 web application&lt;/description&gt;
          &lt;url&gt;https://github.com/kolorobot/spring-mvc-quickstart-archetype&lt;/url&gt;
          &lt;properties&gt;
                  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;/properties&gt;
  
    &lt;build&gt;
      &lt;extensions&gt;
        &lt;extension&gt;
          &lt;groupId&gt;org.apache.maven.archetype&lt;/groupId&gt;
          &lt;artifactId&gt;archetype-packaging&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
        &lt;/extension&gt;
      &lt;/extensions&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;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;pluginManagement&gt;
        &lt;plugins&gt;
          &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-archetype-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.2&lt;/version&gt;
          &lt;/plugin&gt;
        &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And the following...</p>
  
  <pre><code>javac -version
  javac 1.8.0_05
  </code></pre>
  
  <p>But when I run mvn install I get...</p>
  
  <pre><code>[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project basic: Compilation failure
  [INFO] Failure executing javac, but could not parse the error:
  [INFO] javac: invalid target release: 1.7
  </code></pre>
  
  <p>Anyone know what I am missing?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I found vi src/main/resources/archetype-resources/pom.xml  that needed to be updated as well. Now I get...</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: invalid target release: 1.8
  </code></pre>
  
  <p>Also I tried this...</p>
  
  <pre><code>export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
  </code></pre>
  
  <p>no dice</p>