I agree that there are many ways to solve the problem of updating libraries in various projects. I had this discussion a few years back with John Casey and Tim O'Brien, although coming at it from a different angle.
http://getsatisfaction.com/sonatype/topics/how_do_i_layout_subversion_with_multi_module_builds The pom-updater does run after deploy, as part of the release:perform goals, so there is no issue with un-deployed artifacts being referenced. We are a relatively small company, and don't need/want the extra overhead of doing Nexus staging of each of our shared libraries (we have a lot of shared libraries among a few top-level products). In any case, none of that has to do with the question itself (although I agree at stepping back to look at the big picture as well). So, even if I run my plugin after release is complete, I still need it to run on all the modules. That is the root of my question: how do I make the plugin do that? It sounds like @aggregator is the answer, so I'll try that. -Ben On Wed, Dec 7, 2011 at 10:09 AM, Anders Hammar <[email protected]> wrote: > I don't think that you approach is good. If you want it to happen > together with release:perform, it MUST happen after deploy as the > deploy to the repo could fail. If that fails, you mustn't update any > project depending on it as it doesn't exist in the repo. Also, if > you're using some kind of staging (like in Nexus Pro), you simply > can't do this update until the artifact has been promoted/released. > > Also, your comment about updating "module projects" in your repo. I > assume you're talking about the artifacts in the maven repo? They must > never be changed, so don't do this! > > If I were you, I would perform this update dependencies as a > completely separate activity after the release has been fully > completed. Including staging and whatever it would include. Everything > doesn't have to be bound to the Maven build. Some things are more > appropriate to perform as a separate step. > > /Anders > On Wed, Dec 7, 2011 at 15:41, Ben Tatham <[email protected]> wrote: > > Hi, > > We have a custom plugin that runs whenever we release a project. Most of > > our projects are _not_ multi-module, so it generally works fine by adding > > that plugin to the release-plugin <goals>. However, when I add that into > > the root pom of a multi-module build, it only runs on the top-level > > project, even though the modules inherit from that pom and do declare > > maven-release-plugin so in theory, it should pick up that configuration. > > > > Is there a way to force the plugin to run in each module during release? > > I've explored options on the plugin itself [1] and options on the > > maven-release-plugin[2] , but can't find anything about this issue. > > > > Specifically, our plugin goes through our scm repository and updates the > > dependencies in all our designated pom's to the newly released version of > > the project being released - so we also want the module projects to get > > updated in our repository. > > > > Thanks, > > Ben > > > > [1] http://maven.apache.org/developers/mojo-api-specification.html > > [2] > http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html > > > > -- > > Ben Tatham > > Software Developer > > Nanometrics Inc. > > +1 613-592-6776 x254 > > http://www.nanometrics.ca > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Ben Tatham Software Developer Nanometrics Inc. +1 613-592-6776 x254 http://www.nanometrics.ca
