Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23474

wildfly-maven-plugin needs maven-war-plugin 3.3.2 on JDK 17

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 8.0.0.GA
    • 8.0.0.Beta
    • Documentation
    • None

    Description

      Maven 3.8.5 and prior bring version of org.apache.maven.plugins:maven-war-plugin < 3.3.2. This causes following issue on JDK 17 when trying to package war application with wildfly-maven-plugin:

      [WARNING] Error injecting: org.apache.maven.plugin.war.WarMojo
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Error injecting constructor, java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
        at org.apache.maven.plugin.war.WarMojo.<init>(Unknown Source)
        while locating org.apache.maven.plugin.war.WarMojo
      
      1 error
          at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
      

      the workaround is to configure org.apache.maven.plugins:maven-war-plugin:3.3.2 in application pom.xml:

      ...
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-war-plugin</artifactId>
                      <version>${version.maven.war.plugin}</version>
                  </plugin>
              </plugins>
      ...
      

      This might change with future version of Maven. Currently there is no newer version of Maven.

      Attachments

        1. demo.zip
          7 kB
        2. maven.log
          15 kB

        Issue Links

          Activity

            People

              rhn-support-rchettri Rahuul Chettri
              jkasik@redhat.com Jan Kašík
              Jean Francois Denise
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: