views:

34

answers:

1

I'm trying to get the Maven release plugin working with a Jazz.net source control system and Rational Application Developer (RAD, based on Eclipse), but I seem to have run into a catch-22 - I expect I've misunderstood something.

So - I'm working on the command-line in the project directory that has the .pom file. I have to shut RAD down otherwise I get resource locking problems.

When I run mvn release:prepare, Maven generates a bunch of new files in my RAD/Eclipse workspace and modifies the pom.

The next thing that happens is that the release plugin tries to mvn scm:checkin the pom, and I get a zillion stacktraces saying Resource is out of sync with the file system for the pom file, and the process fails.

So I can't prepare my release in RAD, as the spawned Maven complains about file locking. I can't prepare my release on the command line, as Maven complains that RAD doesn't know about the changes to the pom - I don't seem to be able to make RAD aware of these changes without firing it up.

What am I doing wrong?

A: 

To fix the "Resource is out of sync", enable "Refresh automatically" in the "General / Workspace" preferences. Note that it takes a couple of seconds for RAD/Eclipse to notice that files have changed. So I doubt that this will help much.

The reason for the resource locking problems can be at two places: Either you're using a Windows filesystem. They don't allow two processes to change the same file at the same time by default. Instead, the first process locks the file and the second process gets an error. There is little you can do. Changing your OS to Linux would help but that's probably out of the question.

What I'm wondering though: The "Resource is out of sync" is an Eclipse error. This shouldn't bother the scm plugin of Maven - it's running in a different VM. So shutting down RAD during the release should work.

Aaron Digulla
Yep - I was shutting down RAD before trying to run the build and still getting the resource problem - very strange.
Brabster