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

hpi:run takes org.apache.maven.embedder.MavenEmbedderException building m2 project

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      I'm trying to create a Hudson plugin. I issued:

      $ mvn hpi:create
      $ <edit pom.xml to set Hudson version to 1.352>
      $ mvn hpi:run

      When Hudson 1.352 starts I create a new M2 job which pulls over SVN from https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core ... I also have automatically installed maven-2.2.1. I am able to build the project just fine using work/tools/*/bin/mvn in the checked out workspace.

      Here's the console for the M2 project:

      Started by user anonymous
      Checking out a fresh workspace because /home/jesse/tmp/hudson/maven-columns/work/jobs/maven-core/workspace/maven-core doesn't exist
      Checking out https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core
      A src
      [ skipping many files ]
      At revision 927118
      Parsing POMs
      ERROR: Failed to parse POMs
      org.apache.maven.embedder.MavenEmbedderException: Cannot lookup required component.
      at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:731)
      at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:181)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:857)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:786)
      at hudson.FilePath.act(FilePath.java:747)
      at hudson.FilePath.act(FilePath.java:729)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:531)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:391)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      at hudson.model.Run.run(Run.java:1243)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:122)
      Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.project.MavenProjectBuilder.
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
      at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
      at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:695)
      ... 12 more
      Finished: FAILURE

          [JENKINS-6052] hpi:run takes org.apache.maven.embedder.MavenEmbedderException building m2 project

          Alan Harder added a comment -

          Do you still see this problem in a recent Hudson release?
          I created a new m2 job, set the svn url, and put "clean package" for goals, (that's it!), saved and started job.. seems to run fine (this is on current svn, 1.361-SNAPSHOT).

          Alan Harder added a comment - Do you still see this problem in a recent Hudson release? I created a new m2 job, set the svn url, and put "clean package" for goals, (that's it!), saved and started job.. seems to run fine (this is on current svn, 1.361-SNAPSHOT).

          jieryn added a comment -

          I can not verify this because of JENKINS-6433 which is fairly pervasive (I believe fixing it will require updating all plugins to at least the version of Hudson where we fix the base POM to not use this m3 reserved word).

          jieryn added a comment - I can not verify this because of JENKINS-6433 which is fairly pervasive (I believe fixing it will require updating all plugins to at least the version of Hudson where we fix the base POM to not use this m3 reserved word).

          Alan Harder added a comment -

          can you test with maven 2.x, or shall we close this issue?

          Alan Harder added a comment - can you test with maven 2.x, or shall we close this issue?

          jieryn added a comment -

          I tested it on mvn-2.2.1 and it worked fine. This is an m3 problem in that m3 can not be used to actually run Hudson via hpi:run. Please do not close it.

          jieryn added a comment - I tested it on mvn-2.2.1 and it worked fine. This is an m3 problem in that m3 can not be used to actually run Hudson via hpi:run. Please do not close it.

          Alan Harder added a comment -

          seems to fall under JENKINS-6433 (dev stuff, building or hpi:run) or JENKINS-4988 (user stuff, using hudson with maven 3) to me..

          Alan Harder added a comment - seems to fall under JENKINS-6433 (dev stuff, building or hpi:run) or JENKINS-4988 (user stuff, using hudson with maven 3) to me..

          Alan Harder added a comment -

          What's the status of this one now? I know a couple minor changes for m3 have been made so far, but not sure if it's enough yet to make this work.

          Alan Harder added a comment - What's the status of this one now? I know a couple minor changes for m3 have been made so far, but not sure if it's enough yet to make this work.

          jieryn added a comment -

          I verify this still happens with Hudson v1.373 and maven-3-beta2 ... same stack trace.

          jieryn added a comment - I verify this still happens with Hudson v1.373 and maven-3-beta2 ... same stack trace.

          evernat added a comment -

          Hi Jieryn,
          Any news on this?

          evernat added a comment - Hi Jieryn, Any news on this?

          jieryn added a comment -

          This is no longer a problem with recent Jenkins versions. I tested on v1.425 and can not reproduce the problem. Closing.

          jieryn added a comment - This is no longer a problem with recent Jenkins versions. I tested on v1.425 and can not reproduce the problem. Closing.

            Unassigned Unassigned
            jieryn jieryn
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: