Hi Stephen,Thanks for the prompt reply and apparently it was my bad. You are right in that the file structure and project structure does not have to be in sync (although it would be a good practice). My problem was that the parent module declared about 50 modules in its <modules> section but all child modules had a <parent> section which was pointing to something else, which gave a "Project X is not the parent of the artifact Project Y". I have cleaned up the hierarchy and the versions plugin looks okay now.
Problem with perforce: For people who use perforce, this plugin will have a glitch. Perforce marks all checked-out files as "read-only" and only after you do a "Open For Edit" you will be able to checkin. So when I run the "mvn versions:update-child-modules" the plugin complains saying [ERROR] java.io.FileNotFoundException: C:\Perforce\se\research\maven2migration\HEAD\project-x\..\module-y\pom.xml (Access is denied) The alternative is that, because you know what poms are going to get edited roughly, use perforce client to mark all of them for edit, and then run the plugin. (Then from perforce revert all unchanged files and check in the rest, hacky but that seems to be the only way around) I think it would be safe to say the versions plugin does not (rather "should not") really interact with scm plugin to actually "open the file for edit" in source control. I am resorting to this hacky way of running the plugin. However, if someone knows a better way please let me know. Thanks, Kannan On Wed, Feb 18, 2009 at 2:23 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > What goal are you using? > > There are two gaols that help with the fixup: > > versions:update-parents - this will update any parent *from outside > the reactor* to the latest version. > versions:update-child-modules - this will fix the child modules of a > multi-module build... the only issue with this at present is that the > parent has to be the aggregator. > > It would help if we knew the structure you have > > -Stephen (the primary developer of versions-maven-plugin) > > 2009/2/18 Kannan Ekanath <kannan.ekan...@gmail.com>: > > Hi, > > I am part of a big corporate where we have about 40 different modules and > we > > release about 7 or 8 in any given release. We had a lot of problems > manually > > updating the pom versions of the unreleased modules. While trying to > address > > this issue, I was given the plugin > > http://mojo.codehaus.org/versions-maven-plugin/index.html > > > > which would automatically fix childs "parent" section when only some of > the > > modules are released. > > However the biggest problem is that this plugin expects that the parent > > child project structure also mirrors the directory structure in source > > control. This however will not be possible. So is there an alternative ? > > Other than getting the source code and trying to fix this myself? > > -- > > Regards, > > Kannan Ekanath > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Regards, Kannan Ekanath