Hello. If anything the code needs to be moved into the SCM plugin so it is at least self contained.
What you're running into here is a bit of the history. The primary client of the SCM code is the release manager (Continuum and a few others may also use it). So they are somewhat closely tied. The other problem is that the SCM API is (due to historic reasons) pretty much tied around the concept of CVS/SVN and their similar bretheren. Other SCM's, Jazz, ClearCase, and probably Accuurev and Perforce (and others that do NOT use a .svn or similar approach) can have some issues in working to the existing API. Eg Jazz has no equivalent to a svn add. It can only commit. The answer here, is to provide a properly abstracted SCM API. And that can not be done without breaking everything. >>For instance, the scm:tag or scm:branch mojos doesn’t change the <scm> URL as they should. I do not agree. Tag creates a tag. Branch creates a branch. Period. To do what you suggest also requires additional commits. That is not the purpose of the SCM API. That would be the job of the calling process, not the SCM API/Implementation. So all you need to do is to manipulate the pom, and commit it. Adding a mojo to specifically deal with one section of a pom, in your case, the <scm> section, is too fine grained. -Chris On Thu, Aug 30, 2012 at 11:42 PM, Thomas Demande <thomas.dema...@bsb.com>wrote: > Hi all, > > There is a useful feature in the maven-release-manager module regarding > SCM transformation, especially when performing a release. > The AbstractRewritePomsPhase< > http://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.3.2/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java> > class defines a transformScm method, that is able to perform various > transformations for the <scm> tag, for a number of providers. > > Could that feature be extracted into a shared component (or a specific > mojo at least)? > > Other plugins like the Maven SCM Plugin or the Versions Maven Plugin could > for instance possibly use it, and having an “official” way to deal with > this <scm> tag transformations would be nice. For instance, the scm:tag or > scm:branch mojos doesn’t change the <scm> URL as they should. > Currently, the only way to produce a releasable pom is to use the > release-prepare mojo, as the update-versions one skips the transformScm > operation (maybe being able to use it like for the release phase, with a > parameter, would be good too). > I guess you guys here may have other suggestions, I just think that having > a clean way to deal with <scm> tag changes can ease a bunch of use cases. > > Thanks > > ________________________________ > Thomas Demande (thomas.dema...@bsb.com<mailto:thomas.dema...@bsb.com>) > Senior Consultant > > BSB Belgium (www.bsb.com<http://www.bsb.com>) > Boulevard Baudouin 1er, 25 - B-1348 Louvain-la-Neuve > T: +32 10 48 79 63 - F: +32 10 48 34 99 > ________________________________ > > BSB GROUP DISCLAIMER > This e-mail message and any attachments are intended exclusively for the > addressee(s) and may contain information which is confidential and/or > protected by intellectual property rights. If you receive this e-mail by > mistake, please notify immediately the sender, or BSB Group (by e-mail at > disclai...@bsb.com<mailto:disclai...@bsb.com>), and delete the message > and any attachments without printing, copying or opening it. Any > disclosure, reproduction, distribution or use of this message or any > attachments, by persons other than the designed addressee(s), is strictly > prohibited. E-mail transmission and Internet use cannot be guaranteed to be > secure. BSB Group and its subsidiaries cannot be held responsible for any > loss, delay or damage arising from their use. > > ________________________________ >