Continuum
  1. Continuum
  2. CONTINUUM-1575

Confusing behavior when continuum can't construct MavenProject from pom

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1-beta-4
    • Fix Version/s: 1.2
    • Component/s: Core system
    • Labels:
      None
    • Environment:
      not environment-specific
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      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.

        Activity

        Hide
        Matthew Buckett added a comment -

        I hit this issue when my <scm> URLs were present but didn't point to a folder that contained a pom.xml file.

        eg I had

        scm:svn:https://some.svn.server/project/myproject

        instead of

        scm:svn:https://some.svn.server/project/myproject/trunk

        Show
        Matthew Buckett added a comment - I hit this issue when my <scm> URLs were present but didn't point to a folder that contained a pom.xml file. eg I had scm:svn: https://some.svn.server/project/myproject instead of scm:svn: https://some.svn.server/project/myproject/trunk
        Hide
        Emmanuel Venisse added a comment -

        Olivier,
        is it fixed by r664117?

        Show
        Emmanuel Venisse added a comment - Olivier, is it fixed by r664117?
        Hide
        Olivier Lamy added a comment -

        Yes fixed with rev 664117.
        The log says now :

        2008-06-12 01:08:30,953 [addMavenTwoProjectBackgroundThread] ERROR mavenBuilderHelper  - 
        Missing 'scm' element in the test-project POM.
        

        Which is more human readable

        Show
        Olivier Lamy added a comment - Yes fixed with rev 664117. The log says now : 2008-06-12 01:08:30,953 [addMavenTwoProjectBackgroundThread] ERROR mavenBuilderHelper - Missing 'scm' element in the test-project POM. Which is more human readable

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Adrian Sox
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: