title: nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing
body: <p>This worked fine for me be building under Java 8. Now under Java 17.01 I get this when I do mvn deploy.</p>
  <p>mvn install works fine. I tried 3.6.3 and 3.8.4 and updated (I think) all my plugins to the newest versions.</p>
  <p>Any ideas?</p>
  <pre><code>[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
  ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
  
  
  [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  [ERROR]
  [ERROR] -----------------------------------------------------
  [ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not &quot;opens java.util&quot; to unnamed module @149f5761
  [ERROR] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
  type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
  
  Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
  atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
  </code></pre>
  <p>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/maven-v4_0_0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;io.github.sproket&lt;/groupId&gt;
      &lt;artifactId&gt;persism&lt;/artifactId&gt;
      &lt;version&gt;2.0.0&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
  
      &lt;build&gt;
          &lt;sourceDirectory&gt;./src&lt;/sourceDirectory&gt;
          &lt;testSourceDirectory&gt;./test&lt;/testSourceDirectory&gt;
          &lt;testResources&gt;
              &lt;testResource&gt;
                  &lt;directory&gt;./test&lt;/directory&gt;
                  &lt;!--                &lt;includes&gt;--&gt;
                  &lt;!--                    &lt;include&gt;*.*&lt;/include&gt;--&gt;
                  &lt;!--                &lt;/includes&gt;--&gt;
              &lt;/testResource&gt;
          &lt;/testResources&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.8.1&lt;/version&gt;
                  &lt;!-- MSSQL does not seem to able to connect with 16 --&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;17&lt;/source&gt;
                      &lt;target&gt;17&lt;/target&gt;
  &lt;!--                    &lt;compilerArgs&gt;--&gt;
  &lt;!--                        &lt;arg&gt;-parameters&lt;/arg&gt;--&gt;
  &lt;!--                    &lt;/compilerArgs&gt;--&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifestEntries&gt;
                              &lt;Automatic-Module-Name&gt;sproket.github.io.persism&lt;/Automatic-Module-Name&gt;
                          &lt;/manifestEntries&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-sources&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar-no-fork&lt;/goal&gt;
                          &lt;/goals&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-javadoc-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;excludePackageNames&gt;net.sf.persism.log*;net.sf.persism.logging.*&lt;/excludePackageNames&gt;
                      &lt;source&gt;17&lt;/source&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-javadocs&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0-M5&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;excludedGroups&gt;net.sf.persism.categories.ExternalDB,net.sf.persism.categories.TestContainerDB
                      &lt;/excludedGroups&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.sonatype.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;nexus-staging-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.6.8&lt;/version&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
                  &lt;configuration&gt;
                      &lt;serverId&gt;ossrh&lt;/serverId&gt;
                      &lt;nexusUrl&gt;https://s01.oss.sonatype.org/&lt;/nexusUrl&gt;
                      &lt;autoReleaseAfterClose&gt;true&lt;/autoReleaseAfterClose&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;name&gt;persism&lt;/name&gt;
      &lt;description&gt;A zero ceremony ORM for Java&lt;/description&gt;
      &lt;url&gt;https://github.com/sproket/Persism&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;17&lt;/java.version&gt;
          &lt;maven.compiler.release&gt;17&lt;/maven.compiler.release&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;licenses&gt;
          &lt;license&gt;
              &lt;name&gt;BSD-3-Clause License&lt;/name&gt;
              &lt;url&gt;https://github.com/sproket/Persism/blob/master/license.txt&lt;/url&gt;
          &lt;/license&gt;
      &lt;/licenses&gt;
  
      &lt;developers&gt;
          &lt;developer&gt;
              &lt;name&gt;Dan Howard&lt;/name&gt;
              &lt;email&gt;--------------------------&lt;/email&gt;
              &lt;organization&gt;io.github&lt;/organization&gt;
              &lt;organizationUrl&gt;https://sproket.github.io/Persism/&lt;/organizationUrl&gt;
          &lt;/developer&gt;
      &lt;/developers&gt;
  
      &lt;distributionManagement&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;ossrh&lt;/id&gt;
              &lt;url&gt;https://s01.oss.sonatype.org/content/repositories/snapshots&lt;/url&gt;
          &lt;/snapshotRepository&gt;
          &lt;repository&gt;
              &lt;id&gt;ossrh&lt;/id&gt;
              &lt;url&gt;https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/distributionManagement&gt;
  
      &lt;scm&gt;
          &lt;connection&gt;scm:git:git://github.com/sproket/Persism.git&lt;/connection&gt;
          &lt;developerConnection&gt;scm:git:ssh://github.com/sproket/Persism.git&lt;/developerConnection&gt;
          &lt;url&gt;https://github.com/sproket/Persism&lt;/url&gt;
      &lt;/scm&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;include-test-containers-db&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.0.0-M5&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;excludedGroups&gt;net.sf.persism.categories.ExternalDB&lt;/excludedGroups&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;exclude-test-containers-db&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.0.0-M5&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;excludedGroups&gt;net.sf.persism.categories.TestContainerDB&lt;/excludedGroups&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;release&lt;/id&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.2.0&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;archive&gt;
                                  &lt;manifestEntries&gt;
                                      &lt;Automatic-Module-Name&gt;sproket.github.io.persism&lt;/Automatic-Module-Name&gt;
                                  &lt;/manifestEntries&gt;
                              &lt;/archive&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.2.1&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;attach-sources&lt;/id&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;jar-no-fork&lt;/goal&gt;
                                  &lt;/goals&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-javadoc-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.2.0&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;attach-javadocs&lt;/id&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;jar&lt;/goal&gt;
                                  &lt;/goals&gt;
                                  &lt;configuration&gt;
                                      &lt;release&gt;17&lt;/release&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-gpg-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.0.1&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;sign-artifacts&lt;/id&gt;
                                  &lt;phase&gt;verify&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;sign&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.13.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.carrotsearch&lt;/groupId&gt;
              &lt;artifactId&gt;junit-benchmarks&lt;/artifactId&gt;
              &lt;version&gt;0.7.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testcontainers&lt;/groupId&gt;
              &lt;artifactId&gt;testcontainers&lt;/artifactId&gt;
              &lt;version&gt;1.15.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
              &lt;version&gt;1.2.7&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.17&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
              &lt;version&gt;2.14.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
              &lt;version&gt;2.14.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
              &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
              &lt;version&gt;1.4&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.firebirdsql.jdbc&lt;/groupId&gt;
              &lt;artifactId&gt;jaybird&lt;/artifactId&gt;
              &lt;version&gt;4.0.2.java8&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.firebirdsql&lt;/groupId&gt;
              &lt;artifactId&gt;firebird-testcontainers-java&lt;/artifactId&gt;
              &lt;version&gt;1.1.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;1.4.200&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;!-- using older version as 2.5.1 collides with ucanaccess --&gt;
              &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
              &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
              &lt;version&gt;2.5.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;!--            &lt;classifier&gt;debug&lt;/classifier&gt;--&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
              &lt;artifactId&gt;derby&lt;/artifactId&gt;
              &lt;version&gt;10.8.2.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- OR -Djdk.tls.client.protocols=TLSv1 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
              &lt;artifactId&gt;mssql-jdbc&lt;/artifactId&gt;
              &lt;version&gt;8.4.1.jre8&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.testcontainers&lt;/groupId&gt;
              &lt;artifactId&gt;mssqlserver&lt;/artifactId&gt;
              &lt;version&gt;1.15.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&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.23&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.testcontainers&lt;/groupId&gt;
              &lt;artifactId&gt;mysql&lt;/artifactId&gt;
              &lt;version&gt;1.15.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.sourceforge.jtds&lt;/groupId&gt;
              &lt;artifactId&gt;jtds&lt;/artifactId&gt;
              &lt;version&gt;1.3.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.oracle.database.jdbc&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc8&lt;/artifactId&gt;
              &lt;version&gt;21.3.0.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!--        &lt;dependency&gt;--&gt;
          &lt;!--            &lt;groupId&gt;com.oracle&lt;/groupId&gt;--&gt;
          &lt;!--            &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;--&gt;
          &lt;!--            &lt;version&gt;11.2.0.4&lt;/version&gt;--&gt;
          &lt;!--            &lt;scope&gt;test&lt;/scope&gt;--&gt;
          &lt;!--        &lt;/dependency&gt;--&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;version&gt;9.2-1004-jdbc41&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testcontainers&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;version&gt;1.15.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.xerial&lt;/groupId&gt;
              &lt;artifactId&gt;sqlite-jdbc&lt;/artifactId&gt;
              &lt;version&gt;3.34.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.sf.ucanaccess&lt;/groupId&gt;
              &lt;artifactId&gt;ucanaccess&lt;/artifactId&gt;
              &lt;version&gt;5.0.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.ibm.informix&lt;/groupId&gt;
              &lt;artifactId&gt;informix-jdbc-complete&lt;/artifactId&gt;
              &lt;version&gt;4.50.4.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.toddfast.typeconverter&lt;/groupId&gt;
              &lt;artifactId&gt;typeconverter&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.reflections&lt;/groupId&gt;
              &lt;artifactId&gt;reflections&lt;/artifactId&gt;
              &lt;version&gt;0.9.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;javax.persistence-api&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin --&gt;
          &lt;!-- DOES NOT WORK with JAVA 8 + --&gt;
          &lt;!--        &lt;dependency&gt;--&gt;
          &lt;!--            &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;--&gt;
          &lt;!--            &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;--&gt;
          &lt;!--            &lt;version&gt;2.7&lt;/version&gt;--&gt;
          &lt;!--            &lt;scope&gt;test&lt;/scope&gt;--&gt;
          &lt;!--            &lt;exclusions&gt;--&gt;
          &lt;!--                &lt;exclusion&gt;--&gt;
          &lt;!--                    &lt;groupId&gt;com.sun&lt;/groupId&gt;--&gt;
          &lt;!--                    &lt;artifactId&gt;tools&lt;/artifactId&gt;--&gt;
          &lt;!--                &lt;/exclusion&gt;--&gt;
          &lt;!--            &lt;/exclusions&gt;--&gt;
          &lt;!--        &lt;/dependency&gt;--&gt;
  
  
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>