[ http://jira.codehaus.org/browse/MRELEASE-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270210#comment-270210 ]
Lee Thompson commented on MRELEASE-457: --------------------------------------- Trying to catch up on this as I'm hitting it to. Don't think the patch will work if there is no pom in the top directory of the source repo. In line with what Benjamin stated, I think its better to inject rather than discover. Injection of something like "pomSubDirectory" as a parameter into the release:perform mojo would be very unobtrusize. The release descriptor already has "ScmRelativePathProjectDirectory". Not sure if that is the right variable, but if it was, it would be a very simple non-intrusive fix of PerformReleaseMojo.java ... {code:title=Bar.java|borderStyle=solid} /** * If the POM for the project you are releasing is not in the top directory of your checked * out source repository, then you will need to specicify this parameter. It almost never * occurs with Subversion since you can specify a checkout of any directory in the * repository. This is not the case for SCM systems like Git and Mercurial as you check * out the whole repository and frequently, the project you want to release is not in * the top directory. If your pom is in the top directory of your source, this parameter * is not needed. * * @parameter expression="${pomSubDirectory}" * @since 2.2 */ private String pomSubDirectory; if (pomSubDirectory != null ) { releaseDescriptor.setScmRelativePathProjectDirectory( pomSubDirectory ); } {code} > Non sparse-checkout SCM support > ------------------------------- > > Key: MRELEASE-457 > URL: http://jira.codehaus.org/browse/MRELEASE-457 > Project: Maven 2.x Release Plugin > Issue Type: New Feature > Components: perform, scm > Affects Versions: 2.0 > Reporter: Mark Struberg > Assignee: Mark Struberg > Fix For: 2.2 > > Attachments: MRELEASE-457.2.patch, MRELEASE-457.patch > > > Some SCMs like GIT, Mercurial, Bazaar, BitKeeper, Darcs, and Monotone doesn't > support sparse checkouts (checkout of a single subdirectory). > So while doing a mvn release:perform in a sub-module, we will always get the > _whole_ project checked out into target/checkout! > For doing the clean build from this checkout, we have to implement a > functionality to find the right submodule first. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira