Re: Release Plugin -Dproject.scm.developerConnection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Release Plugin -Dproject.scm.developerConnection

stephenconnolly
On Wed, 19 Sep 2018 at 06:54, Lui Baeumer <[hidden email]> wrote:

> Hi developers,
>
> I've got an issue with the release plugin as it does not recognize the
> parameter
> -Dproject.scm.developerConnection.
>
> My build fails with:
> Missing required setting: scm connection or developerConnection must
> be specified.
>
> It works if I add an scm tag to the pom.xml, but I would prefer to
> pass the scm connection via commandline as describes here:
> https://maven.apache.org/guides/mini/guide-releasing.html
>
> The reason is that we have got a central build pipeline which builds
> 100+ applications. After migrating to the (great) release plugin
> mechanism, we have to add the scm tag to all application pom.xml
> files. Therefore I would like to pass the parameter from outside via
> -D option.
>
> If you confirm that this is an issue I would have a look at the code
> and might provide a patch.
>

The <scm> tag is supposed to be defined in all pom.xml files that are a
release root, as the value of that tag is used to perform the checkout for
the release:perform build.

Depending on your SCM you may not need to define it for all your poms.

For example, if you use Subversion as a SCM, and your project is structured
such that the parent is in the parent directory then the calculated
inherited scm tag will match the effective scm tag.

On the other hand, if you use Git as a SCM then you will just need to put
the scm tag in the root pom of every git repo (because with Git, best
practice is to have the release root as the root pom)

My recommendation is just to always define the <scm> tag if the project is
a release root. This has the benefit of signalling to readers that the pom
is intended to be a release root.

FYI: by "release root" I mean the root project of a multi-module set of
projects that get released and versioned atomically. You only *need* the
scm tag in the release root poms (you may also want to add the scm tag to
child poms that do not share the inheritance hierarchy if you are using the
site plugin to generate documentation - as in those cases the computed scm
URL would be incorrect... but it is not required by the release plugin)


> Best regards,
>
> Lui
>
> P.S. full output attached
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]