Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-405

Workaround XStream incompatibility with Java9

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Labels:
      None

      Description

      The problem is that XStreams tries to access "comparator" field of java.util.TreeMap and this is forbidden in Java9

      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module
      Happens while initializing org.apache.maven.plugins.war.util.WebappStructureSerializer
      

      A possibile workaround is to change the initialization of XStreams in a way that only useful converters are registers, thus bypassing the problem

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rfscholte Robert Scholte
                Reporter:
                eolivelli Enrico Olivelli
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: