title: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
body: <p>I'm running this command through Jenkins file:
  sh &quot;${mvnHome}/bin/mvn clean package&quot;</p>
  <p>and getting this error:
  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project automation: Fatal error compiling: invalid target release: 11 -&gt;</p>
  <p><strong>When I'm running this command locally (using my IntelliJ terminal) it works as should!!
  mvn version is 3.6.0 in both Jenkins server and my computer</strong></p>
  <p>my pom:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;automation&lt;/groupId&gt;
      &lt;artifactId&gt;automation&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;ssl-profile&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;repositories&gt;
                  &lt;repository&gt;
                      &lt;id&gt;central-1&lt;/id&gt;
                      &lt;url&gt;https://repo1.maven.org/maven2&lt;/url&gt;
                      &lt;snapshots&gt;
                          &lt;enabled&gt;false&lt;/enabled&gt;
                      &lt;/snapshots&gt;
                  &lt;/repository&gt;
              &lt;/repositories&gt;
              &lt;pluginRepositories&gt;
                  &lt;pluginRepository&gt;
                      &lt;id&gt;central-2&lt;/id&gt;
                      &lt;url&gt;https://repo1.maven.org/maven2&lt;/url&gt;
                      &lt;snapshots&gt;
                          &lt;enabled&gt;false&lt;/enabled&gt;
                      &lt;/snapshots&gt;
                  &lt;/pluginRepository&gt;
              &lt;/pluginRepositories&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
                  &lt;artifactId&gt;lombok&lt;/artifactId&gt;
                  &lt;version&gt;1.18.12&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/junit/junit --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
              &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
              &lt;version&gt;5.1.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sun.mail&lt;/groupId&gt;
                  &lt;artifactId&gt;javax.mail&lt;/artifactId&gt;
                  &lt;version&gt;1.6.2&lt;/version&gt;
              &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.9.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.restassured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;2.9.0&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;
              &lt;artifactId&gt;json-schema-validator&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- Java 6 = JAX-B Version 2.0   --&gt;
          &lt;!-- Java 7 = JAX-B Version 2.2.3 --&gt;
          &lt;!-- Java 8 = JAX-B Version 2.2.8 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
              &lt;version&gt;2.3.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-core&lt;/artifactId&gt;
              &lt;version&gt;2.3.0.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
              &lt;version&gt;2.3.0.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-osgi&lt;/artifactId&gt;
              &lt;version&gt;2.3.0.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils&lt;/artifactId&gt;
              &lt;version&gt;1.9.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jetbrains&lt;/groupId&gt;
              &lt;artifactId&gt;annotations&lt;/artifactId&gt;
              &lt;version&gt;13.0&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/commons-lang/commons-lang --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.jsoup/jsoup --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
              &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
              &lt;version&gt;1.11.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.twilio.sdk&lt;/groupId&gt;
              &lt;artifactId&gt;twilio&lt;/artifactId&gt;
              &lt;version&gt;7.34.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/commons-validator/commons-validator --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-validator&lt;/groupId&gt;
              &lt;artifactId&gt;commons-validator&lt;/artifactId&gt;
              &lt;version&gt;1.4.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;8.0.16&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.4.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/javax.mail/javax.mail-api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;javax.mail-api&lt;/artifactId&gt;
              &lt;version&gt;1.6.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.awaitility&lt;/groupId&gt;
              &lt;artifactId&gt;awaitility&lt;/artifactId&gt;
              &lt;version&gt;3.1.6&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.awaitility&lt;/groupId&gt;
              &lt;artifactId&gt;awaitility-proxy&lt;/artifactId&gt;
              &lt;version&gt;3.1.6&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.api-client&lt;/groupId&gt;
              &lt;artifactId&gt;google-api-client&lt;/artifactId&gt;
              &lt;version&gt;1.23.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.oauth-client&lt;/groupId&gt;
              &lt;artifactId&gt;google-oauth-client-jetty&lt;/artifactId&gt;
              &lt;version&gt;1.23.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.apis&lt;/groupId&gt;
              &lt;artifactId&gt;google-api-services-sheets&lt;/artifactId&gt;
              &lt;version&gt;v4-rev516-1.23.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-validator --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.fge&lt;/groupId&gt;
              &lt;artifactId&gt;json-schema-validator&lt;/artifactId&gt;
              &lt;version&gt;2.2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.github.fge/jackson-coreutils --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.fge&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-coreutils&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.fge&lt;/groupId&gt;
              &lt;artifactId&gt;json-schema-core&lt;/artifactId&gt;
              &lt;version&gt;1.2.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin --&gt;
  
      &lt;/dependencies&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-surefire-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.21.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;properties&gt;
                              &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
                              &lt;property&gt;
                                  &lt;name&gt;listener&lt;/name&gt;
                                  &lt;value&gt;test_listener.TestListener&lt;/value&gt;
                              &lt;/property&gt;
                          &lt;/properties&gt;
                          &lt;systemPropertyVariables&gt;
                              &lt;kobi&gt;old&lt;/kobi&gt;
                          &lt;/systemPropertyVariables&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&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;source&gt;11&lt;/source&gt;
                          &lt;target&gt;11&lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/java&lt;/directory&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*.json&lt;/include&gt;
                      &lt;include&gt;**/*.xsd&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/resource&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*.json&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>