title: Problem with Maven war plugin 3.0.0 due to an API incompatibility
body: <p>I'm following this JSF tutorial <a href="https://www.tutorialspoint.com/jsf/index.htm" rel="noreferrer">https://www.tutorialspoint.com/jsf/index.htm</a>.
  I think I've done everything that was written there (downloading all the required sw, setting the environment with path to the variables, etc.) but I cannot resolve a compilation problem with Maven war plugin. I've already read a lot of questions and possible solutions and I think I've tried most of the combination proposed (mvn clean then install, set the correct version of jdk, point to jdk directory instead of jde, remove .m2 repository, forced upgrade of the project, etc.). So, here I am, maybe describing my specific problem will help to understand how to solve it.</p>
  <p>Output of mvn clean install:</p>
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.0.0:war (default-war) on project helloworld: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:3.0.0:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:3.0.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
  [ERROR] -----------------------------------------------------
  [ERROR] realm =    plugin&gt;org.apache.maven.plugins:maven-war-plugin:3.0.0
  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  [ERROR] urls[0] = file:/C:/Users/do.romano/.m2/repository/org/apache/maven/plugins/maven-war-plugin/3.0.0/maven-war-plugin-3.0.0.jar
  [ERROR] urls[1] = file:/C:/Users/do.romano/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
  [ERROR] urls[2] = file:/C:/Users/do.romano/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
  [ERROR] urls[3] = file:/C:/Users/do.romano/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
  [ERROR] urls[4] = file:/C:/Users/do.romano/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.6/plexus-component-annotations-1.6.jar
  [ERROR] urls[5] = file:/C:/Users/do.romano/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
  [ERROR] urls[6] = file:/C:/Users/do.romano/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
  [ERROR] urls[7] = file:/C:/Users/do.romano/.m2/repository/org/apache/maven/maven-archiver/3.1.1/maven-archiver-3.1.1.jar
  [ERROR] urls[8] = file:/C:/Users/do.romano/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.0.1/maven-shared-utils-3.0.1.jar
  [ERROR] urls[9] = file:/C:/Users/do.romano/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
  [ERROR] urls[10] = file:/C:/Users/do.romano/.m2/repository/org/codehaus/plexus/plexus-archiver/3.4/plexus-archiver-3.4.jar
  [ERROR] urls[11] = file:/C:/Users/do.romano/.m2/repository/org/codehaus/plexus/plexus-io/2.7.1/plexus-io-2.7.1.jar
  [ERROR] urls[12] = file:/C:/Users/do.romano/.m2/repository/org/apache/commons/commons-compress/1.11/commons-compress-1.11.jar
  [ERROR] urls[13] = file:/C:/Users/do.romano/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
  [ERROR] urls[14] = file:/C:/Users/do.romano/.m2/repository/org/tukaani/xz/1.5/xz-1.5.jar
  [ERROR] urls[15] = file:/C:/Users/do.romano/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.22/plexus-interpolation-1.22.jar
  [ERROR] urls[16] = file:/C:/Users/do.romano/.m2/repository/com/thoughtworks/xstream/xstream/1.4.9/xstream-1.4.9.jar
  [ERROR] urls[17] = file:/C:/Users/do.romano/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
  [ERROR] urls[18] = file:/C:/Users/do.romano/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
  [ERROR] urls[19] = file:/C:/Users/do.romano/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.jar
  [ERROR] urls[20] = file:/C:/Users/do.romano/.m2/repository/org/apache/maven/shared/maven-filtering/3.1.1/maven-filtering-3.1.1.jar
  [ERROR] urls[21] = file:/C:/Users/do.romano/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
  [ERROR] urls[22] = file:/C:/Users/do.romano/.m2/repository/org/apache/maven/shared/maven-mapping/3.0.0/maven-mapping-3.0.0.jar
  [ERROR] Number of foreign imports: 1
  [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  [ERROR]
  [ERROR] -----------------------------------------------------
  [ERROR] : ExceptionInInitializerError: 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 @6f798482
  [ERROR] -&gt; [Help 1]
  </code></pre>
  <p>Maven version:</p>
  <pre><code>Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
  Maven home: C:\Program Files\apache-maven-3.8.1\bin\..
  Java version: 16.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-16.0.1
  Default locale: it_IT, platform encoding: Cp1252
  OS name: &quot;windows 10&quot;, version: &quot;10.0&quot;, arch: &quot;amd64&quot;, family: &quot;windows&quot;
  </code></pre>
  <p>Java version:</p>
  <pre><code>java version &quot;16.0.1&quot; 2021-04-20
  Java(TM) SE Runtime Environment (build 16.0.1+9-24)
  Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
  </code></pre>
  <p>Eclipse error which point the the first row of pom.xml: <a href="https://i.ibb.co/t4CNwR3/problema4.png" rel="noreferrer">https://i.ibb.co/t4CNwR3/problema4.png</a></p>
  <p>pom.xml:</p>
  <pre><code>&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;com.tutorialspoint.test&lt;/groupId&gt;
    &lt;artifactId&gt;helloworld&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;helloworld Maven Webapp&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    
      &lt;dependency&gt;
        &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
        &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
        &lt;version&gt;2.1.7&lt;/version&gt;
      &lt;/dependency&gt;
      
      &lt;dependency&gt;
        &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
        &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
        &lt;version&gt;2.1.7&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    
    &lt;build&gt;
      &lt;finalName&gt;helloworld&lt;/finalName&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.3&lt;/version&gt;
              &lt;configuration&gt;
                 &lt;source&gt;16.0.1&lt;/source&gt;
                 &lt;target&gt;16.0.1&lt;/target&gt;
                 &lt;compilerArgument&gt;-Xlint:all&lt;/compilerArgument&gt;
                 &lt;showWarnings&gt;true&lt;/showWarnings&gt;
                 &lt;showDeprecation&gt;true&lt;/showDeprecation&gt;
              &lt;/configuration&gt;
           &lt;/plugin&gt;
           
           &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;webResources&gt;
                     &lt;resource&gt;
                        &lt;directory&gt;WebContent&lt;/directory&gt;
                     &lt;/resource&gt;
                  &lt;/webResources&gt;
                  &lt;useCache&gt;false&lt;/useCache&gt;
              &lt;/configuration&gt;
           &lt;/plugin&gt;
  
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  
  </code></pre>