views:

20

answers:

1

Hi,

I got an error in Hudson console out saying the build fail because Maven release plugin cannot update POM.xml version while there are still unresolved files. The problem is caused by other people updating the POM during the build.

Can any guru teach me how to solve the problem? I am think about a P4 lock, anyone can give me more details of using P4 lock with Maven and hudson?

A: 

If people aren't allowed to edit the POM.xml during the build, p4 lock would certainly be a good solution. The only other possibility I see is enabling maven to somehow merge the changes in, but it seems like the risk of conflicts might be high.

jgritty
But the release plugin itself will need to update the version pom.xml. Will the plugin block by the P4 lock as well? At which stage I should call the P4 Lcok?
Javabeginner
It sounds as though the lock needs to be in effect for the duration of the build, as any user submitting it would cause it to fail. If the same user/client (within the build) implements the lock as the one used by the plugin to edit the POM.xml you should be fine. Make sure your scripts cleanup and release the lock in ALL cases though.
jgritty