title: Fatal error compiling: invalid flag: --release for jdk 11 on Jenkins?
body: <p>Recently I have upgraded spring batch project from java 8 to 11.</p>
  <p>It works fine locally, and I decided to push to the Jenkins, but I get the following error.</p>
  <pre><code>Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project bandwidth: 
  
  Fatal error compiling: invalid flag: --release -&gt; [Help 1]
  </code></pre>
  <p>What should be the cause, and how can I solve it?</p>
  <p><strong>Old setting: java 8 in pom</strong></p>
  <pre><code>&lt;properties&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
  
      &lt;org.springframework-version&gt;3.1.1.RELEASE&lt;/org.springframework-version&gt;
      &lt;org.springframework.batch&gt;2.1.9.RELEASE&lt;/org.springframework.batch&gt;
      &lt;org.slf4j-version&gt;1.6.2&lt;/org.slf4j-version&gt;
  &lt;/properties&gt;
  &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
              &lt;source&gt;1.7&lt;/source&gt;
              &lt;target&gt;1.7&lt;/target&gt;
              &lt;encoding&gt;iso-8859-1&lt;/encoding&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p><strong>New setting: java 11 in pom</strong></p>
  <pre><code>&lt;properties&gt;
          &lt;java.version&gt;11&lt;/java.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
          &lt;org.springframework-version&gt;3.1.1.RELEASE&lt;/org.springframework-version&gt;
          &lt;org.springframework.batch&gt;2.1.9.RELEASE&lt;/org.springframework.batch&gt;
          &lt;org.slf4j-version&gt;1.6.2&lt;/org.slf4j-version&gt;
  &lt;/properties&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.1&lt;/version&gt;
       &lt;configuration&gt;
              &lt;release&gt;11&lt;/release&gt;
              &lt;encoding&gt;iso-8859-1&lt;/encoding&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>