One of the questions in my original post was actually "which pom should you execute 'mvn release:prepare release:perform' on?". I'm guessing, based on nothing else but intuition, that it's the parent pom, not the root pom, so, in my case, I suppose that'd be production/app/parent-pom/pom.xml. However, that SO question was just for poms that aren't at the repo root; my question is a touch more specific than that, what with a parent-pom as a sibling to its children, which is a common use case, IME.
Thoughts? On Mon, Oct 15, 2012 at 4:03 PM, Lyons, Roy <roy.ly...@cmegroup.com> wrote: > > The way I am reading this, you need to add it to the pom which you are > invoking maven on. So whichever pom file you are running maven against > for the call to the release plugin (not talking the submodules here, but > the pom closest to the invocation of maven), add this in -- basically > pointing to the relative path (relative to your git repository root) to > the pom you are running maven against. > > > Thanks, > > Roy Lyons > Senior Configuration Engineer > > > On 10/15/12 3:31 PM, "Matthew Adams" <matt...@matthewadams.me> wrote: > >>Thanks, Roy. The answer you pointed me to says "add the following to >>your build/plugins section", but it doesn't tell me **which** pom to >>add to...leaving me confused. Can you clarify for the answerer (since >>I don't have enough repu points to comment on the answer & ask for >>clarification). >> >>On Mon, Oct 15, 2012 at 2:49 PM, Lyons, Roy <roy.ly...@cmegroup.com> >>wrote: >>> I had remembered looking this up and thought I would share my finding >>>with >>> you: >>> >>>http://stackoverflow.com/questions/5558785/maven-release-plugin-git-and-t >>>he >>> -poms-not-at-the-top >>> >>> Basically theres a >>> <configuration> >>> <pomFileName>subdir/pom.xml</pomFileName> >>> </configuration> >>> That you need to define as part of your plugin definition. >>> >>> >>> >>> >>> Thanks, >>> >>> Roy Lyons >>> Senior Configuration Engineer >>> >>> >>> >>> >>> >>> >>> On 10/15/12 1:17 PM, "Matthew Adams" <matt...@matthewadams.me> wrote: >>> >>>>Hi all, >>>> >>>>I'm trying to visualize how to perform a release properly, given that >>>> >>>>* I'm using git with git-flow on a >>>>* multi-module maven project with a >>>>* parent pom module that is located in a sibling directory to the >>>>other modules which are >>>>* located in a directory other than the git repository's root directory. >>>> >>>>The docs for using the maven-release-plugin seem a little sparse when >>>>used with multi-module maven projects like mine. For example, my git >>>>repo's root directory (the one containing the .git directory) has a >>>>subdirectory called "production/app". The multi-module root pom is at >>>>production/app/pom.xml, and looks like this: >>>> >>>><project xmlns="http://maven.apache.org/POM/4.0.0" >>>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >>>>http://maven.apache.org/maven-v4_0_0.xsd"> >>>> <modelVersion>4.0.0</modelVersion> >>>> <groupId>org.example</groupId> >>>> <artifactId>app-root</artifactId> >>>> <packaging>pom</packaging> >>>> <version>0.2.0.BUILD-SNAPSHOT</version> >>>> <name>Application Multimodule Root POM</name> >>>> >>>> <modules> >>>> <module>parent-pom</module> >>>> <module>test-support</module> >>>> <module>support</module> >>>> <module>domain</module> >>>> <module>dto</module> >>>> <module>service</module> >>>> <module>rest</module> >>>> <module>web</module> >>>> </modules> >>>></project> >>>> >>>>Note that it basically only contains <module> entries, one of which is >>>>the parent-pom module, which is in the directory >>>>production/app/parent-pom (the parent pom is then >>>>production/app/parent-pom/pom.xml) and all of the other modules in the >>>>project, then, declare the relative path to the parent pom to be >>>>"<relativePath>../parent-pom/pom.xml</relativePath>". Now, I'm trying >>>>to use the maven-release-plugin with this project along with git-flow. >>>> I'm planning on using the following settings, which I've seen in >>>>several posts on using it with git-flow: >>>> >>>> <plugin> >>>> >>>><groupId>org.apache.maven.plugins</groupId> >>>> >>>><artifactId>maven-release-plugin</artifactId> >>>> <version>2.3.2</version> >>>> <configuration> >>>> >>>><autoVersionSubmodules>true</autoVersionSubmodules> >>>> >>>><localCheckout>true</localCheckout> >>>> <pushChanges>false</pushChanges> >>>> >>>><tagNameFormat>v@{project.version}</tagNameFormat> >>>> </configuration> >>>> </plugin> >>>> >>>>* Into which pom do I put this plugin configuration: the root pom >>>>(production/app/pom.xml) or the parent pom >>>>(production/app/parent-pom/pom.xml)? >>>>* Into which root or parent's section should this <plugin> section be >>>>placed: <build><pluginManagement><plugins> or <build><plugins>? >>>> >>>>Here's my <scm> section (I'm using "xxx" & "yyy" protect the innocent): >>>> >>>> <scm> >>>> >>>><connection>scm:git:g...@github.com:xxx/yyy.git</connection> >>>> >>>><developerConnection>scm:git:g...@github.com:xxx/yyy.git</developerConnec >>>>tion> >>>> <url>https://github.com/xxx/yyy</url> >>>> </scm> >>>> >>>>* How do I tell maven that this maven project is located off of the >>>>repo's root, in production/app? Do I use >>>>"scm:git:g...@github.com:xxx/yyy.git/production/app" or something else? >>>> >>>>* Into which pom do I put the <scm> section: the root pom, the parent >>>>pom, or in each module's pom? If the root pom, do I use >>>>"scm:git:g...@github.com:xxx/yyy.git/production/app"? If the parent >>>>pom, do I use >>>>"scm:git:g...@github.com:xxx/yyy.git/production/app/parent-pom"? >>>> If in each module's pom, do I use >>>>"scm:git:g...@github.com:xxx/yyy.git/production/app/module_name"? >>>> >>>>* Into which pom to I put the <distributionManagement> section: the >>>>root pom, the parent pom, or each module's pom? >>>> >>>>* After I issue my "git flow release start 0.2.0.RELEASE" in my dev >>>>branch's production/app directory, in which directory (after switching >>>>to the release/0.2.0.RELEASE branch, of course) do I issue the command >>>>"mvn release:prepare release:perform": production/app or >>>>production/app/parent-pom? >>>> >>>>-- >>>>mailto:matt...@matthewadams.me >>>>skype:matthewadams12 >>>>googletalk:matt...@matthewadams.me >>>>http://matthewadams.me >>>>http://www.linkedin.com/in/matthewadams >>>> >>>>--------------------------------------------------------------------- >>>>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>>>For additional commands, e-mail: users-h...@maven.apache.org >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >> >> >> >>-- >>mailto:matt...@matthewadams.me >>skype:matthewadams12 >>googletalk:matt...@matthewadams.me >>http://matthewadams.me >>http://www.linkedin.com/in/matthewadams >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>For additional commands, e-mail: users-h...@maven.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > -- mailto:matt...@matthewadams.me skype:matthewadams12 googletalk:matt...@matthewadams.me http://matthewadams.me http://www.linkedin.com/in/matthewadams --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org