@aggregator does not do what I need. The plugin still only runs on the top-level module. Am I missing something incredibly obvious about the core of maven multi-module builds?
>mvn ca.nanometrics.maven:nmx-pom-plugin:1.5.5-SNAPSHOT:parent [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] nmx-pom [INFO] common-pom [INFO] common-pom-java6 [INFO] common-pom-libgcj [INFO] web-common-pom [INFO] web-common-pom-java6 [INFO] web-common-pom-libgcj [INFO] galileo-common-pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building nmx-pom 4.1.14 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- nmx-pom-plugin:1.5.5-SNAPSHOT:parent (default-cli) @ nmx-pom --- ... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] nmx-pom ........................................... SUCCESS [27.467s] [INFO] common-pom ........................................ SKIPPED [INFO] common-pom-java6 .................................. SKIPPED [INFO] common-pom-libgcj ................................. SKIPPED [INFO] web-common-pom .................................... SKIPPED [INFO] web-common-pom-java6 .............................. SKIPPED [INFO] web-common-pom-libgcj ............................. SKIPPED [INFO] galileo-common-pom ................................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27.934s [INFO] Finished at: Wed Dec 07 11:34:48 EST 2011 [INFO] Final Memory: 5M/245M [INFO] ------------------------------------------------------------------------ On Wed, Dec 7, 2011 at 11:16 AM, Ben Tatham <[email protected]>wrote: > 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 > > > -- Ben Tatham Software Developer Nanometrics Inc. +1 613-592-6776 x254 http://www.nanometrics.ca
