I suppose it's obvious, but I still think it's a flaw ...
I have 23 Mavenized projects. Now I add the <scm> bit because I started using the release plugin. Here is my thought process:
- I will add a <scm> section only in my base POM company and parameterize URLs with properties, for example.
<scm> <connection>${scmBaseConnection}/${scm.module}/${scm.edition}</connection> <developerConnection>${scmBaseConnection}/${scm.module}/${scm.edition}</developerConnection> <url>${fisheyeBaseUrl}/${scm.module}</url> </scm>
- Then, each POM root project (aggregator) only needs to declare it scm.
<properties> respectively (and no need to re-declare the entire <scm> section), for example:
<scm.module>sharktopus</scm.module> <scm.edition>trunk</scm.edition>
But I soon realized that I couldnβt do this: the release plugin overwrites each POM with the tag and the next versions of SCM information, so each such POM needs <scm> section.
Well, thatβs why I decided to save the general SCM data in the basic properties of the POM, and each POM of the project should declare its own <scm> section using these details, as well as its own features, for example:
<scm> <connection>${scmBaseConnection}/sharktopus/trunk</connection> <developerConnection>${scmBaseConnection}/sharktopus/trunk</developerConnection> <url>${fisheyeBaseUrl}/sharktopus</url> </scm>
But this also does not work, because the release plugin is overwritten using the allowed values ββ(which is quite obvious in retrospect). So, for example, for the POM release tag, the information above would be rewritten as:
<scm> <connection>scm:svn:https://mysvnhost.net/sharktopus/tags/R1_NewStuff</connection> <developerConnection>scm:svn:https://mysvnhost.net/sharktopus/tags/R1_NewStuff</developerConnection> <url>https://mysvnhost.net/sharktopus</url> </scm>
This means that each POM must have its own <scm> with hardcoded URLs .
- Is that what everyone does?
- What happens if your SCM URLs change - are you just doing a search / replace on all your projects?
- Could this be a feature request to the release plugin to rewrite partial URLs, for example. keep property references, but rewrite "final" features?
source share