Uploaded image for project: 'Continuum'
  1. Continuum
  2. CONTINUUM-1575

Confusing behavior when continuum can't construct MavenProject from pom

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-4
    • 1.2
    • Core system
    • None
    • not environment-specific

    Description

      If a POM that fails validation is checked in, continuum's behavior makes it difficult to determine the actual cause.

      In this case, Continuum produces two build results from a single build.

      The first build result is an error result, with output like

      org.codehaus.plexus.taskqueue.execution.TaskExecutionException: Error executing action 'update-project-from-working-directory'
      at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildController.java:434)
      at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:139)
      at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecutor.java:50)
      at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
      at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
      at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.apache.maven.continuum.execution.ContinuumBuildExecutorException: Error while mapping metadata:add.project.validation.error
      add.project.project.building.error
      add.project.unknown.error

      at org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut(MavenTwoBuildExecutor.java:157)
      at org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction.execute(UpdateProjectFromWorkingDirectoryContinuumAction.java:75)
      at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildController.java:408)
      ... 8 more

      This is not exactly descriptive, although it does suggest a validation error.

      This initial build result is the latest build result for an extremely short window (~2 seconds); it is quickly supplanted by a second result (Warning):

      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building Maven Default Project
      [INFO] task-segment: [clean, deploy]
      [INFO] ----------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: < 1 second
      [INFO] Finished at: Wed Nov 21 14:17:02 CST 2007
      [INFO] Final Memory: 1M/2M
      [INFO] ------------------------------------------------------------------------

      This error is extremely confusing. The apparent cause of the error (no pom) is confirmed if we look at the build directory, but it isn't clear why that pom is gone. (It turns out that in the error handling of DefaultMavenBuilderHelper.getMavenProject, Continuum deletes the POM file.)

      So, to summarize:
      1. Continuum produces two conflicting build results for a single build.
      2. Continuum deletes the pom if it can't construct a MavenProject from the pom.
      3. The first error message is very difficult to interpret. The second is perfectly clear, but completely irrelevant.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            asox Adrian Sox
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: