Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68890

compilation error with core (java11 eclipse compiler)

    XMLWordPrintable

Details

    • 2.358

    Description

      if you use the eclipse compiler to try and build core you see a lot of code failing to compile as there there are classes contained in 2 locations which is illegal (the javac compiler is allowing this - but I believe eclipse is correct in emmitting this error)

      the biggest offender seems to be org.xml.sax.SAXException which is mostly coming from test cases (that use JenkinsRule.createWebClient()

      the error is The package org.xml.sax is accessible from more than one module: <unnamed>, java.xml

      This can be trivially fixed in test code by changing the throws `SAXException to throws EXception however this is not fixing the underlying issue where the classes are in 2 distinct jar files.

      Steps to Reproduce

      clone jenkinsci/jenkins
      import the project into eclipse as a maven project (using m2e)

      Expected results

      The project imports and builds without issue
      This was the case prior to java11 work

      actual results

      The project imports however has a slew of java compilation issues the majority of which are all about importing org.xml.sax.something or org.w3c.someting,

      Note: this could possibly be reproduced by switching maven to use the eclipse compiler also. https://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html

      Attachments

        Activity

          teilo James Nord created issue -
          teilo James Nord made changes -
          Field Original Value New Value
          Labels java11 java11-compatibility regression
          teilo James Nord made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          teilo James Nord made changes -
          Assignee James Nord [ teilo ]
          teilo James Nord made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          teilo James Nord made changes -
          Remote Link This issue links to "PR (Web Link)" [ 27902 ]
          teilo James Nord made changes -
          Remote Link This issue links to "htmlunit PR (Web Link)" [ 27906 ]
          teilo James Nord made changes -
          Remote Link This issue links to "new Jenkins core PR (Web Link)" [ 27907 ]
          teilo James Nord made changes -
          Remote Link This issue links to "JTH PR (Web Link)" [ 27908 ]
          basil Basil Crow made changes -
          Released As 2.358
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
          teilo James Nord made changes -
          Remote Link This issue links to "actual Jenkins PR containing the fix (Web Link)" [ 27922 ]
          notmyfault Alexander Brandes made changes -
          Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

          People

            teilo James Nord
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: