jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Continuum
  • CONTINUUM-1808

Maven2 POM validation errors should end up in the Output text field of the Build results!

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.2.1
  • Component/s: Integration - Maven 2
  • Labels:
    None
  • Complexity:
    Intermediate

Description

Hello,

One of our Maven2 projects started to fail on Continuum. When I checked the Builds page, there were always pairs of entries with a few seconds between them. For each of these pairs of build results, the former was always in Error, while the latter (most recent build) was always in Failure.

The log of the error build was this:

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$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
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

The log of the failure build was this:

+ Error stacktraces are turned on.
Maven version: 2.0.8
Java version: 1.4.2_08
OS name: "sunos" version: "5.10" arch: "sparc" Family: "unix" [DEBUG] Building Maven user-level plugin registry from: '/home/Dci/.m2/plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: '/dvp/lib/sft/maven/install/2.0.8/conf/plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean, deploy, site]
[INFO] ------------------------------------------------------------------------
[DEBUG] maven-clean-plugin: resolved to version 2.2 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::10 for project: null:maven-clean-plugin:maven-plugin:2.2 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::7 for project: org.apache.maven.plugins:maven-plugins:pom:10 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::4 for project: org.apache.maven:maven-parent:pom:7 from the repository.
[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] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:373)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Jun 24 08:35:33 CEST 2008 [INFO] Final Memory: 1M/4M [INFO] ------------------------------------------------------------------------

If I look at the Working copy, there is no pom.xml file, so I was quite puzzled. The CVS repository does contain the pom.xml and a checkout of the project to my local workstation was completely OK.

I finally found the error in the wrapper.log. The POM used a property to resolve a dependency version that was undefined in the parent pom, leading to validation errors. This error message should definitely end up in the Output textfield of a Build results page in the webfrontend!!!

INFO | jvm 1 | 2008/06/24 08:35:31 | 2008-06-24 08:35:31,497 [pool-1-thread-1] ERROR org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper:default - Cannot build maven project from /dvp_loc_ci_00_00/dvp/loc/rts/ci/working-directory/53/pom.xml (Failed to validate POM).
INFO | jvm 1 | 2008/06/24 08:35:31 | 'dependencies.dependency.version' is missing for be.telenet:srv.location.location

Another remark: having two entries in the Build results page for a build I triggered once made me believe that there were two copies of Continuum running, with the error coming from concurrent access of the working copy. A build failure should only end up in one build result...

Greetz,

Ringo De Smet

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ringo De Smet added a comment - 24/Jun/08 3:40 AM

A bit more info on our project setup: all projects refer to a main POM. Dependencies in a project only define the groupId and artifactId. The main POM has an extensive dependenyManagement section wherein Maven finds all the remaining information like version, classifiers, types, etc for each of the project dependencies.

In the failing project above, I forgot to define this section for project srv.location.location in the dependencyManagement, while I added this artifact as a dependency in the (now failing) project.

Hope this helps to validate a future fix in a test-case project setup.

Show
Ringo De Smet added a comment - 24/Jun/08 3:40 AM A bit more info on our project setup: all projects refer to a main POM. Dependencies in a project only define the groupId and artifactId. The main POM has an extensive dependenyManagement section wherein Maven finds all the remaining information like version, classifiers, types, etc for each of the project dependencies. In the failing project above, I forgot to define this section for project srv.location.location in the dependencyManagement, while I added this artifact as a dependency in the (now failing) project. Hope this helps to validate a future fix in a test-case project setup.
Hide
Permalink
Emmanuel Venisse added a comment - 06/Oct/08 11:32 PM

Fixed in r.702340

Show
Emmanuel Venisse added a comment - 06/Oct/08 11:32 PM Fixed in r.702340
Hide
Permalink
Reimer Prochnow added a comment - 14/May/09 2:56 AM

I have the same type of error against continuum 1.2.3, Build: 732759 using maven 2.0.9.
My project setup is nearly the same as Ringo described: a master pom which is definining versions in a dependencyManagement section.
It seems that the update-project-from-working-directory is using a cached version (inside db??) of the master pom, as the console build works without errors, using the same commands as continuum does for svn update / mvn. After the update fails, the pom.xml is deleted and an error is raised.
The result page contains two entries for a single build trigger:

  • an error: Error while mapping metadata:Failed to validate POM for project
  • a warning some seconds later, reported by maven
    [INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
    The second one seems to be a somehow parallel execution failing due to the deleted pom file.

Stack traces follows:

2009-05-14 08:09:07,815 [pool-1-thread-1] INFO buildController - Initializing build
2009-05-14 08:09:07,868 [pool-1-thread-1] INFO buildController - Starting build of product-bs
2009-05-14 08:09:07,968 [pool-1-thread-1] INFO buildController - Updating working dir
2009-05-14 08:09:07,968 [pool-1-thread-1] INFO buildController - Performing action check-working-directory
2009-05-14 08:09:07,969 [pool-1-thread-1] INFO buildController - Performing action update-working-directory-fr
om-scm
2009-05-14 08:09:08,052 [pool-1-thread-1] INFO action#update-working-directory-from-scm - Updating project: pr
oduct-bs', id: '315' to '/data/maven/continuum/working-directory/315'.
2009-05-14 08:09:08,090 [pool-1-thread-1] INFO org.apache.continuum.scm.manager.Slf4jScmLogger - Executing: /b
in/sh -c cd /data/maven/continuum/working-directory/315 && svn --username deploy --password '*****' --non-intera
ctive update /data/maven/continuum/working-directory/315
2009-05-14 08:09:08,090 [pool-1-thread-1] INFO org.apache.continuum.scm.manager.Slf4jScmLogger - Working direc
tory: /data/maven/continuum/working-directory/315
2009-05-14 08:09:09,194 [pool-1-thread-1] INFO buildController - Merging SCM results
2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - The project was not built because no changes
were detected in sources since the last build.
2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - Found dependencies changes, building
2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - Changes found in the current project, building
2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - Performing action update-project-from-working
-directory
2009-05-14 08:09:09,289 [pool-1-thread-1] INFO action#update-project-from-working-directory - Updating project
'product-bs' from checkout.
2009-05-14 08:09:09,409 [pool-1-thread-1] ERROR mavenBuilderHelper - Cannot build maven project from /data/mave
n/continuum/working-directory/315/pom.xml (Failed to validate POM for project com.hansenet.bs.product:product-bs
at /data/maven/continuum/working-directory/315/pom.xml).
'dependencies.dependency.version' is missing for org.springframework:spring
'dependencies.dependency.version' is missing for org.springframework:spring-test
'dependencies.dependency.version' is missing for org.apache.cxf:cxf-rt-frontend-jaxws
'dependencies.dependency.version' is missing for org.apache.cxf:cxf-rt-transports-http

2009-05-14 08:09:09,477 [pool-1-thread-1] ERROR buildController - Error executing action update-project-from-wo
rking-directory '
org.codehaus.plexus.taskqueue.execution.TaskExecutionException: Error executing action 'update-project-from-work
ing-directory'
at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildControlle
r.java:457)
at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:1
60)
at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecu
tor.java:50)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTask
QueueExecutor.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:178)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1
061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
575)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.maven.continuum.execution.ContinuumBuildExecutorException: Error while mapping metadata:Failed to validate POM for project com.hansenet.bs.product:product-bs at /data/maven/continuum/working-directory/315/pom.xml
Can't load the maven project. Verify that your scm url is correct and remove/readd the project.
'dependencies.dependency.version' is missing for org.apache.cxf:cxf-rt-transports-http

at org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut(MavenTw
oBuildExecutor.java:199)
at org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction.execute(Updat
eProjectFromWorkingDirectoryContinuumAction.java:81)
at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildControlle
r.java:435)
... 8 more
2009-05-14 08:09:09,477 [pool-1-thread-1] INFO buildController - Performing action execute-builder
2009-05-14 08:09:09,617 [pool-1-thread-1] INFO shellCommandHelper - Executing: /bin/sh -c cd /data/maven/continuum/working-directory/315 && /home/deploy/build/JavaStuff/apache-maven-2.0.9/bin/mvn --batch-mode --non-recursive -Dcontinuum.project.lastBuild.state=3 -Dcontinuum.project.nextBuild.number=2 -Dcontinuum.project.name=product
-bs -Dcontinuum.project.id=315 -Dcontinuum.project.version=1.0.0-SNAPSHOT -Dcontinuum.project.group.name=Kundenfocus -Dcontinuum.project.lastBuild.number=1 -Dmaven.repo.local=/home/deploy/.m2/repository clean deploy
2009-05-14 08:09:09,617 [pool-1-thread-1] INFO shellCommandHelper - Working directory: /data/maven/continuum/working-directory/315
2009-05-14 08:09:10,962 [pool-1-thread-1] INFO continuumBuildExecutor#maven2 - Exit code: 1
2009-05-14 08:09:11,280 [pool-1-thread-1] INFO buildController - Performing action deploy-artifact
2009-05-14 08:09:11,855 [pool-1-thread-1] INFO org.apache.maven.continuum.notification.mail.MailContinuumNotifier - Message Subject: '[continuum] BUILD FAILURE: Kundenfocus - product-bs - maven clean deploy'.
2009-05-14 08:09:11,855 [pool-1-thread-1] INFO org.apache.maven.continuum.notification.mail.MailContinuumNotifier - Sending message: ....

Show
Reimer Prochnow added a comment - 14/May/09 2:56 AM I have the same type of error against continuum 1.2.3, Build: 732759 using maven 2.0.9. My project setup is nearly the same as Ringo described: a master pom which is definining versions in a dependencyManagement section. It seems that the update-project-from-working-directory is using a cached version (inside db??) of the master pom, as the console build works without errors, using the same commands as continuum does for svn update / mvn. After the update fails, the pom.xml is deleted and an error is raised. The result page contains two entries for a single build trigger:
  • an error: Error while mapping metadata:Failed to validate POM for project
  • a warning some seconds later, reported by maven [INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one. The second one seems to be a somehow parallel execution failing due to the deleted pom file.
Stack traces follows: 2009-05-14 08:09:07,815 [pool-1-thread-1] INFO buildController - Initializing build 2009-05-14 08:09:07,868 [pool-1-thread-1] INFO buildController - Starting build of product-bs 2009-05-14 08:09:07,968 [pool-1-thread-1] INFO buildController - Updating working dir 2009-05-14 08:09:07,968 [pool-1-thread-1] INFO buildController - Performing action check-working-directory 2009-05-14 08:09:07,969 [pool-1-thread-1] INFO buildController - Performing action update-working-directory-fr om-scm 2009-05-14 08:09:08,052 [pool-1-thread-1] INFO action#update-working-directory-from-scm - Updating project: pr oduct-bs', id: '315' to '/data/maven/continuum/working-directory/315'. 2009-05-14 08:09:08,090 [pool-1-thread-1] INFO org.apache.continuum.scm.manager.Slf4jScmLogger - Executing: /b in/sh -c cd /data/maven/continuum/working-directory/315 && svn --username deploy --password '*****' --non-intera ctive update /data/maven/continuum/working-directory/315 2009-05-14 08:09:08,090 [pool-1-thread-1] INFO org.apache.continuum.scm.manager.Slf4jScmLogger - Working direc tory: /data/maven/continuum/working-directory/315 2009-05-14 08:09:09,194 [pool-1-thread-1] INFO buildController - Merging SCM results 2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - The project was not built because no changes were detected in sources since the last build. 2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - Found dependencies changes, building 2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - Changes found in the current project, building 2009-05-14 08:09:09,281 [pool-1-thread-1] INFO buildController - Performing action update-project-from-working -directory 2009-05-14 08:09:09,289 [pool-1-thread-1] INFO action#update-project-from-working-directory - Updating project 'product-bs' from checkout. 2009-05-14 08:09:09,409 [pool-1-thread-1] ERROR mavenBuilderHelper - Cannot build maven project from /data/mave n/continuum/working-directory/315/pom.xml (Failed to validate POM for project com.hansenet.bs.product:product-bs at /data/maven/continuum/working-directory/315/pom.xml). 'dependencies.dependency.version' is missing for org.springframework:spring 'dependencies.dependency.version' is missing for org.springframework:spring-test 'dependencies.dependency.version' is missing for org.apache.cxf:cxf-rt-frontend-jaxws 'dependencies.dependency.version' is missing for org.apache.cxf:cxf-rt-transports-http 2009-05-14 08:09:09,477 [pool-1-thread-1] ERROR buildController - Error executing action update-project-from-wo rking-directory ' org.codehaus.plexus.taskqueue.execution.TaskExecutionException: Error executing action 'update-project-from-work ing-directory' at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildControlle r.java:457) at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:1 60) at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecu tor.java:50) at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTask QueueExecutor.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:178) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1 061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 575) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.maven.continuum.execution.ContinuumBuildExecutorException: Error while mapping metadata:Failed to validate POM for project com.hansenet.bs.product:product-bs at /data/maven/continuum/working-directory/315/pom.xml Can't load the maven project. Verify that your scm url is correct and remove/readd the project. 'dependencies.dependency.version' is missing for org.apache.cxf:cxf-rt-transports-http at org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut(MavenTw oBuildExecutor.java:199) at org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction.execute(Updat eProjectFromWorkingDirectoryContinuumAction.java:81) at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildControlle r.java:435) ... 8 more 2009-05-14 08:09:09,477 [pool-1-thread-1] INFO buildController - Performing action execute-builder 2009-05-14 08:09:09,617 [pool-1-thread-1] INFO shellCommandHelper - Executing: /bin/sh -c cd /data/maven/continuum/working-directory/315 && /home/deploy/build/JavaStuff/apache-maven-2.0.9/bin/mvn --batch-mode --non-recursive -Dcontinuum.project.lastBuild.state=3 -Dcontinuum.project.nextBuild.number=2 -Dcontinuum.project.name=product -bs -Dcontinuum.project.id=315 -Dcontinuum.project.version=1.0.0-SNAPSHOT -Dcontinuum.project.group.name=Kundenfocus -Dcontinuum.project.lastBuild.number=1 -Dmaven.repo.local=/home/deploy/.m2/repository clean deploy 2009-05-14 08:09:09,617 [pool-1-thread-1] INFO shellCommandHelper - Working directory: /data/maven/continuum/working-directory/315 2009-05-14 08:09:10,962 [pool-1-thread-1] INFO continuumBuildExecutor#maven2 - Exit code: 1 2009-05-14 08:09:11,280 [pool-1-thread-1] INFO buildController - Performing action deploy-artifact 2009-05-14 08:09:11,855 [pool-1-thread-1] INFO org.apache.maven.continuum.notification.mail.MailContinuumNotifier - Message Subject: '[continuum] BUILD FAILURE: Kundenfocus - product-bs - maven clean deploy'. 2009-05-14 08:09:11,855 [pool-1-thread-1] INFO org.apache.maven.continuum.notification.mail.MailContinuumNotifier - Sending message: ....
Hide
Permalink
Emmanuel Venisse added a comment - 14/May/09 3:02 AM

To investigate with Reimer's comment

Show
Emmanuel Venisse added a comment - 14/May/09 3:02 AM To investigate with Reimer's comment
Hide
Permalink
Brett Porter added a comment - 27/May/09 7:44 AM

cloned CONTINUUM-2244 for investigation

Show
Brett Porter added a comment - 27/May/09 7:44 AM cloned CONTINUUM-2244 for investigation

People

  • Assignee:
    Emmanuel Venisse
    Reporter:
    Ringo De Smet
Vote (0)
Watch (3)

Dates

  • Created:
    24/Jun/08 2:58 AM
    Updated:
    27/May/09 7:44 AM
    Resolved:
    27/May/09 7:44 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.