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

add a new classloader ("a la" child first for plugin)

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      In order to implement a maven3-plugin, we need a new class loader mechanism to mask current maven classes which are in core (through maven-plugin).

        1. HUDSON-5360
          7 kB
        2. HUDSON-5360
          8 kB
        3. ChildFirstClassLoader.java
          4 kB
        4. ChildFirstClassLoader.java
          3 kB
        5. HUDSON-5360
          9 kB

          [JENKINS-5360] add a new classloader ("a la" child first for plugin)

          Olivier Lamy created issue -
          Olivier Lamy made changes -
          Attachment New: JENKINS-5360 [ 19055 ]
          Olivier Lamy made changes -
          Description Original: For implement a maven3-plugin, we need a new class loader mechanism to mask current maven class which are in core (through maven-plugin). New: In order to implement a maven3-plugin, we need a new class loader mechanism to mask current maven classes which are in core (through maven-plugin).

          IIUC, I don't think this works. URLClassLoader that's responsible for loading classes from the plugin doesn't have any parent, so if plugin classes refer to classes in Hudson core, for example, then those references will fail to resolve.

          Kohsuke Kawaguchi added a comment - IIUC, I don't think this works. URLClassLoader that's responsible for loading classes from the plugin doesn't have any parent, so if plugin classes refer to classes in Hudson core, for example, then those references will fail to resolve.

          A bit more compact implementation of the child-first classloader, as a result of my looking at the patch. For the reason I put in my earlier comment, this doesn't really work either.

          Kohsuke Kawaguchi added a comment - A bit more compact implementation of the child-first classloader, as a result of my looking at the patch. For the reason I put in my earlier comment, this doesn't really work either.
          Kohsuke Kawaguchi made changes -
          Attachment New: ChildFirstClassLoader.java [ 19064 ]

          Olivier Lamy added a comment -

          here an other proposal.
          This works here with a maven3-plugin.
          If you want I can checkin this last one (but it's a very POC and very in PROGRESS work ).

          Olivier Lamy added a comment - here an other proposal. This works here with a maven3-plugin. If you want I can checkin this last one (but it's a very POC and very in PROGRESS work ).
          Olivier Lamy made changes -
          Attachment New: ChildFirstClassLoader.java [ 19065 ]

          zlosch added a comment - - edited

          From some mail traffic on hudson-dev I guess that it's a blocker to the issue I opened for Maven 3 compatibility.

          zlosch added a comment - - edited From some mail traffic on hudson-dev I guess that it's a blocker to the issue I opened for Maven 3 compatibility.
          zlosch made changes -
          Link New: This issue is blocking JENKINS-4988 [ JENKINS-4988 ]

            olamy Olivier Lamy
            olamy Olivier Lamy
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: