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

Incorrect packaging of Apache HttpComponents in hpi files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • jenkins-test-harness
    • None
    • New parent POM.
      Split JTH

      When migrating plugins to the new parent POM and the split JTH, one of the most usual issues are incompatibilities between the versions of Apache HttpComponents used by the plugin itself (in many cases indirectly through its dependencies) and the one brought by the HtmlUnit dependency of the JTH.

      Normally some juggling the dependencies orders and scopes saves the day, but we are starting to see cases where a configuration that let compilation and tests (including InjectedTests) run turns out building an hpi file that is not the one intended.

      The fact that Maven 3 (correctly, imho) gets rid of the possibility of having different versions of a dependency in different scopes, also contributes to this situation (meaning that this behavior could have been a workaround in Maven 2).

      E.g., in aws-java-sdk-plugin#3, introducing the version of httpclient needed for the InjectedTests in the test scope (we should not upgrade a dependency of a dependency just to get our tests running) causes the HttpComponents libraries not to be included in the hpi, causing JENKINS-35242. On the other hand, in aws-credentials-plugin#9, the HttpComponents dependencies reach the hpi when they should not be included, as they are a dependency of a plugin, not a direct dependency.

            andresrc Andres Rodriguez
            andresrc Andres Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: