title: Issues with maven compiler
body: <p>I am trying to use jetty plugin for a grails project. I am currently using jdk 1.6.0_45. It seems that the jre version used by jdk 1.6 is a little old one for jetty plugin and it generates the following error.</p>
  
  <pre><code>Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/plus/webapp/EnvConfiguration : Unsupported major.minor version 51.0 (Use --stacktrace to see the full trace)
  </code></pre>
  
  <p>To resolve this error I have added a code in the pom.xml to use java source 1.7. The code is something like this.</p>
  
  <pre><code>&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.7&lt;/source&gt;
          &lt;target&gt;1.7&lt;/target&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>But still I continue to get the same error. Can any body please help me out.</p>
  
  <p>I am posting my entire pom.xml and the error that I am getting</p>
  
  <p><strong>pom.xml</strong></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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.mycompany&lt;/groupId&gt;
      &lt;artifactId&gt;grails-mongo-demo&lt;/artifactId&gt;
      &lt;packaging&gt;grails-app&lt;/packaging&gt;
      &lt;version&gt;0.1&lt;/version&gt;
      &lt;name&gt;grails-mongo-demo&lt;/name&gt;
      &lt;description&gt;grails-mongo-demo&lt;/description&gt;
      &lt;properties&gt;
          &lt;grails.version&gt;2.4.2&lt;/grails.version&gt;
          &lt;h2.version&gt;1.3.170&lt;/h2.version&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails&lt;/groupId&gt;
              &lt;artifactId&gt;grails-dependencies&lt;/artifactId&gt;
              &lt;version&gt;${grails.version}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails&lt;/groupId&gt;
              &lt;artifactId&gt;grails-test&lt;/artifactId&gt;
              &lt;version&gt;${grails.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails&lt;/groupId&gt;
              &lt;artifactId&gt;grails-plugin-testing&lt;/artifactId&gt;
              &lt;version&gt;${grails.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.spockframework&lt;/groupId&gt;
              &lt;artifactId&gt;spock-core&lt;/artifactId&gt;
              &lt;version&gt;0.7-groovy-2.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;version&gt;${h2.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails&lt;/groupId&gt;
              &lt;artifactId&gt;grails-datastore-test-support&lt;/artifactId&gt;
              &lt;version&gt;1.0-grails-2.4&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;scaffolding&lt;/artifactId&gt;
              &lt;version&gt;2.1.2&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
              &lt;type&gt;zip&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;cache&lt;/artifactId&gt;
              &lt;version&gt;1.1.7&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
              &lt;type&gt;zip&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;asset-pipeline&lt;/artifactId&gt;
              &lt;version&gt;1.8.11&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
              &lt;type&gt;zip&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;jquery&lt;/artifactId&gt;
              &lt;version&gt;1.11.1&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;type&gt;zip&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;webxml&lt;/artifactId&gt;
              &lt;version&gt;1.4.1&lt;/version&gt;
              &lt;type&gt;zip&lt;/type&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;mongodb&lt;/artifactId&gt;
              &lt;version&gt;3.0.2&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
              &lt;type&gt;zip&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.grails.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;jetty&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;type&gt;zip&lt;/type&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;pluginManagement /&gt;
          &lt;plugins&gt;
              &lt;!-- Disables the Maven surefire plugin for Grails applications, as we have our own test runner --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.17&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;skip&gt;true&lt;/skip&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;surefire-it&lt;/id&gt;
                          &lt;phase&gt;integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;skip&gt;false&lt;/skip&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;filesets&gt;
                          &lt;fileset&gt;
                              &lt;directory&gt;plugins&lt;/directory&gt;
                              &lt;includes&gt;
                                  &lt;include&gt;**/*&lt;/include&gt;
                              &lt;/includes&gt;
                              &lt;followSymlinks&gt;false&lt;/followSymlinks&gt;
                          &lt;/fileset&gt;
                      &lt;/filesets&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.grails&lt;/groupId&gt;
                  &lt;artifactId&gt;grails-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;grailsVersion&gt;${grails.version}&lt;/grailsVersion&gt;
                  &lt;/configuration&gt;
                  &lt;extensions&gt;true&lt;/extensions&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.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
              &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;grails&lt;/id&gt;
              &lt;name&gt;grails&lt;/name&gt;
              &lt;url&gt;http://repo.grails.org/grails/core&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;grails-plugins&lt;/id&gt;
              &lt;name&gt;grails-plugins&lt;/name&gt;
              &lt;url&gt;http://repo.grails.org/grails/plugins&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;tools&lt;/id&gt;
              &lt;activation&gt;
                  &lt;property&gt;
                      &lt;name&gt;java.vendor&lt;/name&gt;
                      &lt;value&gt;Sun Microsystems Inc.&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.sun&lt;/groupId&gt;
                      &lt;artifactId&gt;tools&lt;/artifactId&gt;
                      &lt;version&gt;${java.version}&lt;/version&gt;
                      &lt;scope&gt;system&lt;/scope&gt;
                      &lt;systemPath&gt;${java.home}/../lib/tools.jar&lt;/systemPath&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building grails-mongo-demo 0.1
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ grails-mongo-demo ---
  [INFO] Deleting /mnt/data/Work/Tutorials/Practice/grails/grails-mongo-demo/target
  [INFO] Deleting /mnt/data/Work/Tutorials/Practice/grails/grails-mongo-demo/plugins (includes = [**/*], excludes = [])
  [INFO] 
  [INFO] --- grails-maven-plugin:2.4.3:clean (default-clean) @ grails-mongo-demo ---
  4 Sep, 2014 6:28:00 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
  WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
  4 Sep, 2014 6:28:00 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
  WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
  |Loading Grails 2.4.2
  |Configuring classpath
  |Running pre-compiled script
  .
  |Environment set to development
  ....................
  |Application cleaned.
  [INFO] 
  [INFO] --- grails-maven-plugin:2.4.3:validate (default-validate) @ grails-mongo-demo ---
  [INFO] 
  [INFO] --- grails-maven-plugin:2.4.3:init (default-init) @ grails-mongo-demo ---
  [INFO] 
  [INFO] --- grails-maven-plugin:2.4.3:config-directories (default-config-directories) @ grails-mongo-demo ---
  [INFO] 
  [INFO] --- grails-maven-plugin:2.4.3:maven-compile (default-maven-compile) @ grails-mongo-demo ---
  4 Sep, 2014 6:28:32 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
  WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
  4 Sep, 2014 6:28:32 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
  WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
  |Loading Grails 2.4.2
  |Configuring classpath
  |Running pre-compiled script
  .
  |Environment set to development
  ......
  |Installing zip jetty-3.0.0.zip...
  ...
  |Installed plugin jetty-3.0.0
  .............
  |Installing zip webxml-1.4.1.zip...
  ...
  |Installed plugin webxml-1.4.1
  .............
  |Installing zip asset-pipeline-1.8.11.zip...
  ...
  |Installed plugin asset-pipeline-1.8.11
  ..................
  |Installing zip cache-1.1.7.zip...
  ...
  |Installed plugin cache-1.1.7
  ..............
  |Installing zip scaffolding-2.1.2.zip...
  ...
  |Installed plugin scaffolding-2.1.2
  ..............
  |Installing zip jquery-1.11.1.zip...
  ...
  |Installed plugin jquery-1.11.1
  ..............
  |Installing zip mongodb-3.0.2.zip...
  ...
  |Installed plugin mongodb-3.0.2
  ...................
  |Compiling 87 source files
  .Error 
  |
  Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/plus/webapp/EnvConfiguration : Unsupported major.minor version 51.0 (Use --stacktrace to see the full trace)
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 47.500 s
  [INFO] Finished at: 2014-09-04T18:28:42+05:30
  [INFO] Final Memory: 10M/102M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.3:maven-compile (default-maven-compile) on project grails-mongo-demo: Forked Grails VM exited with 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/MojoExecutionException
  </code></pre>