Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7386

ModelMerger$MergingList is not serializable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6.3, 3.8.4
    • 3.8.5, 4.0.0-alpha-2, 4.0.0
    • Core
    • None

    Description

      Hello!

      Spotless Maven plugin serializes org.apache.maven.model.Plugin instances to fingerprint plugin's configuration. Serialization fails for Maven 3.6.3 with:

      java.io.NotSerializableException: org.apache.maven.model.merge.ModelMerger$MergingList
      

      when plugin configuration comes from pluginManagement. Class org.apache.maven.model.Plugin implements java.io.Serializable, however nested class org.apache.maven.model.merge.ModelMerger$MergingList does not.

      Would it be possible to make MergingList serializable or make Plugin#dependencies field always hold a serializable collection?

      Related issue for the Spotless Maven plugin: https://github.com/diffplug/spotless/issues/1073 and PR with a workaround https://github.com/diffplug/spotless/pull/1074.

      Thank you!

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              lutovich Kostiantyn Liutovych
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: