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

"mvn jetty:run" requires Maven 2.0.4 or else m2 jobs fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Using a build of Hudson from dev sources, and run using
      main/war/pom.xml#jetty:run, I create a new native m2 project based on a trivial
      app with one POM project and two JAR modules, hosted in a local CVS repo. When I
      try to build it, I get an exception from Maven (2.0.7). It builds on the command
      line of course.

      Googling the exception says that it is a problem with ClassLoader.findResources
      being missing, but I don't know how that applies here. A Jetty bug perhaps?

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Created an attachment (id=116)
          Failed build log, incl. lengthy stack trace

          Show
          jglick Jesse Glick added a comment - Created an attachment (id=116) Failed build log, incl. lengthy stack trace
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          This problem is described in
          http://hudson.gotdns.com/wiki/display/JENKINS/Building+Hudson

          The short summary is that Maven inside Hudson (used in the embedder) and Maven
          outside Hudson (that's running Jetty) interferes.

          Come to think of it, maybe I can run embedder in an isolated special classloader
          so that I can hide Maven outside Hudson.

          The work around in the mean time is to use Maven 2.0.4.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - This problem is described in http://hudson.gotdns.com/wiki/display/JENKINS/Building+Hudson The short summary is that Maven inside Hudson (used in the embedder) and Maven outside Hudson (that's running Jetty) interferes. Come to think of it, maybe I can run embedder in an isolated special classloader so that I can hide Maven outside Hudson. The work around in the mean time is to use Maven 2.0.4.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Copying wiki description before I remove them:

          Debugging native m2 project

          When debugging native m2 project like this, Maven code that's hosting
          jetty and Maven code inside Hudson interferes, so you need to use the
          same version of Maven used as dependency in hudson-core (as of 1.115
          that is Maven 2.0.4.) Also see this thread
          <http://www.nabble.com/Running-Hudson-in-Debug-Mode-tf4076845.html>

          Fixed by patching maven-jetty-plugin. The necessary change was made to
          hudson-war POM in 1.155. Going forward, please run "mvn hudson:run", instead of
          "mvn jetty:run".

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Copying wiki description before I remove them: Debugging native m2 project When debugging native m2 project like this, Maven code that's hosting jetty and Maven code inside Hudson interferes, so you need to use the same version of Maven used as dependency in hudson-core (as of 1.115 that is Maven 2.0.4.) Also see this thread < http://www.nabble.com/Running-Hudson-in-Debug-Mode-tf4076845.html > Fixed by patching maven-jetty-plugin. The necessary change was made to hudson-war POM in 1.155. Going forward, please run "mvn hudson:run", instead of "mvn jetty:run".
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Also cross referencing an RFE filed to Jetty.

          http://jira.codehaus.org/browse/JETTY-463

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Also cross referencing an RFE filed to Jetty. http://jira.codehaus.org/browse/JETTY-463
          Hide
          jglick Jesse Glick added a comment -

          Note for future reference: if 'mvn [-f main/war/pom.xml] hudson:run' fails, try
          'mvn hudson-dev:run'.

          Show
          jglick Jesse Glick added a comment - Note for future reference: if 'mvn [-f main/war/pom.xml] hudson:run' fails, try 'mvn hudson-dev:run'.
          Hide
          jglick Jesse Glick added a comment -

          Note that JETTY-282 does not seem to be applied to the copy of
          jetty-maven-plugin in maven-hpi-plugin, so there is no console reloading for
          hpi:run while there is for hudson-dev:run. Should it be updated?

          Show
          jglick Jesse Glick added a comment - Note that JETTY-282 does not seem to be applied to the copy of jetty-maven-plugin in maven-hpi-plugin, so there is no console reloading for hpi:run while there is for hudson-dev:run. Should it be updated?

            People

            • Assignee:
              Unassigned
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: