Well I am not sure this really resolves the problem by itself. I wonder where will the dependency Management be? I think the problem is that the Dependency Management is 'global'. Therefore when we release only one Module, wherever the dependency management is and when it contains other SNAPSHOT versions as well, it will theoretically require all those modules to be released as well in order to avoid the newly released module/parent combo to have SNAPSHOT dependencies.
Alternatively we would need to have the latest release versions in dependency management instead of SNAPSHOT versions and manually update dependency management entry to the next release version each time a new module is released. However then other modules can only depend on release versions without sacrificing central version management. Also the release plugin may not fully support this. In general I would prefer a solution that does not require too many manual steps as this can get out of hand quickly with the ammount of modules we have. Does anybody know of how other maven-based projects handle such situations? On 9 March 2012 15:31, Reto Bachmann-Gmür <[email protected]> wrote: > Hi Daniel > > What do you think about separating reactor pom from parent? If a module is > to be released the parent would generally have to be releases as well for > the other modules to depend on the new version. A conquence of this might > be that the dependencies in parent probably need to be manually maintained > rather than automatically 'snapshotized'. > > Cheers, > Reto > On Mar 9, 2012 2:15 PM, "Daniel Spicar" <[email protected]> wrote: > > > Hi all, > > > > I thought about how to release individual modules but I can't seem to > > figure out how that should be done with our maven project setup. > > > > Let's say I have a development trunk checked out and a maven project with > > this setup: > > > > -parent(0.2-SNAPSHOT) > > --module1(0.3-SNAPSHOT) > > --module2(0.1-SNAPSHOT) > > > > Now I decide module2 needs to be released. What does this mean? > > > > 1) Only module2 is densapshotized, released, resnapshotized. > > What happens is that the release 0.1 of module1 depends on parent > > 0.2-SNAPSHOT in the pom.xml of module1. Furthermore the dependency > > management located in parent 0.2-SNAPSHOT likely has a snapshot version > for > > module3. > > I think releasing sources with snapshot dependencies is wrong. > > > > 2) parent and module2 are denapshotized, released, resnapshotized, > module2 > > is left as it is. > > > > This has some sub-cases: > > 2.1) parent is desnapshotized recursively: this amounts to a full release > > of all modules (when using maven release plugin at least) > > 2.2) parent is densapshotized non-recursively: this means parent needs to > > be released each time a submodule is released. Also parent release 0.2 > > will likely contain a SNAPSHOT version of module1 in dependency > > management. If module2 depends on module1 the release version will depend > > on a snapshot version (the release plugin will likely conplain and ask > for > > versions, this is part of the workflow covered by 2.3). > > 2.3) parent is released in such a manner, that all SNAPSHOT dependencies > in > > dependency management are reverted to the latest (last) release version, > > only module2 is updated to the new release version. This again means > parent > > needs to be released each time a submodule is released. Also afterwards > > non-released modules will need to "fast-forward" to the next SNAPSHOT > > version of parent. I think there is no tool support for such a scenario > and > > this may be a big effort. > > > > Did I miss something? > > > > Note. From the binaries point of view none of this is an issue. The only > > issue is that in the source distribution we have SNAPSHOT dependencies in > > the pom.xml file. > > > > I am interested in how we plan to release single modules as I don't see > an > > easy way to do that consistently. > > > > Daniel > > > > ---------- Forwarded message ---------- > > From: Daniel Spicar <[email protected]> > > Date: 20 February 2012 21:06 > > Subject: Re: Can someone create 0.3-incubating version in our JIRA > project? > > To: [email protected] > > > > > > Hmm that's true. I didn't realize that. And we can't create versions per > > component? Pitty. > > > > > > On 20 February 2012 18:56, Reto Bachmann-Gmür <[email protected]> wrote: > > > > > Hi > > > > > > How do we use these version? Given that every component has its own > > version > > > I don't see how we are supposed to use this version of the parent. > Should > > > we release a new parent whenever we release an updated component? I > don't > > > think the release plugin can easily be used for this, as we would have > to > > > move back the versions to the latest stable one for all componens that > > are > > > not released. > > > > > > Cheers, > > > reto > > > > > > > > > On Mon, Feb 20, 2012 at 5:50 PM, Daniel Spicar < > > [email protected] > > > >wrote: > > > > > > > Hi, > > > > > > > > I find assigning affected and resolved version for my issues very > > helpful > > > > to manage them. I can't create versions myself. Can someone with the > > > > necessary karma do that please? > > > > > > > > Thanks > > > > Daniel > > > > > > > > > >
