You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Laird Nelson <lj...@gmail.com> on 2010/09/28 16:41:00 UTC

Maven release plugin: Should scm pom element track version?

I am a newbie to the maven-release-plugin.

I have performed a couple of test releases with it, and am confused at the
moment about--fortunately--only one thing.

My pom has an <scm> section.  My project, which is currently versioned at
1.2-SNAPSHOT, is under Subversion.

My question is: **after** a release, what, ideally, should be the value for
the <developerConnection> element?  Should it, for example, end in "trunk"?
Recall that after the release there will have been a "tagging" operation,
and the "real" version of my project will live under the Subversion URL
fragment "tags/1.2".  So do I just leave the <developerConnection> alone?
Does the maven-release-plugin get smart here and try to modify this for me?

Thanks,
Laird

Re: Maven release plugin: Should scm pom element track version?

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, Sep 28, 2010 at 11:05 AM, Laird Nelson <lj...@gmail.com> wrote:

> So presumably, then, before I run release:prepare, I should set up my scm
> elements like this (for example):
>
> <developerConnection>scm:svn:http://.../tags/THE_TAG_I_WILL_SOON_RELEASE</developerConnection>
>
>

Ah, no; hopefully I can save you some typing; it looks like it is
recommended that this ALWAYS be /trunk, not /tags/SOMETHING.  Took me a
while to grok http://maven.apache.org/guides/mini/guide-releasing.html,
which actually spells it out.

Thanks,
Laird

Re: Maven release plugin: Should scm pom element track version?

Posted by Justin Edelson <ju...@gmail.com>.

On Sep 28, 2010, at 11:15 AM, Laird Nelson <lj...@gmail.com> wrote:

> On Tue, Sep 28, 2010 at 11:08 AM, Justin Edelson
> <ju...@justinedelson.com>wrote:
> 
>> NOOOOOO. If you use the release plugin, you should never modify the
>> <scm> section manually (after initial configuration).
>> 
> 
> Got it.  :-)  So a pretty standard boring scm stanza would look like this:
> 
> <scm>
>  <connection>scm:svn:http://.../myproject/trunk</connection>
>  <developerConnection>scm:svn:http://
> .../myproject/trunk</developerConnection>
>  <tag>HEAD</tag>
>  <url>http://some/url/to/some/subversion/browsing/tool/trunk</url>
> </scm>
> 
> ...?  Set and forget?
> 
> Best,
> Laird

I don't think you need/want the <tag> element. May not hurt, but I'd take it out.

Justin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven release plugin: Should scm pom element track version?

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, Sep 28, 2010 at 11:08 AM, Justin Edelson
<ju...@justinedelson.com>wrote:

> NOOOOOO. If you use the release plugin, you should never modify the
> <scm> section manually (after initial configuration).
>

Got it.  :-)  So a pretty standard boring scm stanza would look like this:

<scm>
  <connection>scm:svn:http://.../myproject/trunk</connection>
  <developerConnection>scm:svn:http://
.../myproject/trunk</developerConnection>
  <tag>HEAD</tag>
  <url>http://some/url/to/some/subversion/browsing/tool/trunk</url>
</scm>

...?  Set and forget?

Best,
Laird

Re: Maven release plugin: Should scm pom element track version?

Posted by Justin Edelson <ju...@justinedelson.com>.
On Tue, Sep 28, 2010 at 11:05 AM, Laird Nelson <lj...@gmail.com> wrote:
> On Tue, Sep 28, 2010 at 10:46 AM, Justin Edelson
> <ju...@justinedelson.com>wrote:
>
>> After running release:perform, <developerConnection> in your working
>> copy should end in trunk[1]. Running svn info should show that your
>> working copy is a checkout of trunk.
>>
>> If you look in your Maven repository at the released pom, the scm URLs
>> there should end in your tag name.
>>
>
> Thanks VERY much for your quick reply.
>
> So presumably, then, before I run release:prepare, I should set up my scm
> elements like this (for example):
>
> <developerConnection>scm:svn:http://.../tags/THE_TAG_I_WILL_SOON_RELEASE</developerConnection>
>
>
> ...even though of course that tag doesn't exist yet?
>
> Then it sounds like what you're saying is that release:perform will go and
> do surgery here and lop "tags/THE_TAG_I_WILL_SOON_RELEASE" off, and replace
> it with "trunk".  Is that right?
NOOOOOO. If you use the release plugin, you should never modify the
<scm> section manually (after initial configuration).



>
> Do I additionally need to specify the <tag> element?  Or is that inferred or
> supplied (always) on the command line (as it can be, according to the
> release plugin docs)?
>
> Thanks again,
> Laird
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven release plugin: Should scm pom element track version?

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, Sep 28, 2010 at 10:46 AM, Justin Edelson
<ju...@justinedelson.com>wrote:

> After running release:perform, <developerConnection> in your working
> copy should end in trunk[1]. Running svn info should show that your
> working copy is a checkout of trunk.
>
> If you look in your Maven repository at the released pom, the scm URLs
> there should end in your tag name.
>

Thanks VERY much for your quick reply.

So presumably, then, before I run release:prepare, I should set up my scm
elements like this (for example):

<developerConnection>scm:svn:http://.../tags/THE_TAG_I_WILL_SOON_RELEASE</developerConnection>


...even though of course that tag doesn't exist yet?

Then it sounds like what you're saying is that release:perform will go and
do surgery here and lop "tags/THE_TAG_I_WILL_SOON_RELEASE" off, and replace
it with "trunk".  Is that right?

Do I additionally need to specify the <tag> element?  Or is that inferred or
supplied (always) on the command line (as it can be, according to the
release plugin docs)?

Thanks again,
Laird

Re: Maven release plugin: Should scm pom element track version?

Posted by Justin Edelson <ju...@justinedelson.com>.
After running release:perform, <developerConnection> in your working
copy should end in trunk[1]. Running svn info should show that your
working copy is a checkout of trunk.

If you look in your Maven repository at the released pom, the scm URLs
there should end in your tag name.

HTH,
Justin

[1] assuming that you follow the standard Subversion layout which it
looks like you do.

On Tue, Sep 28, 2010 at 10:41 AM, Laird Nelson <lj...@gmail.com> wrote:
> I am a newbie to the maven-release-plugin.
>
> I have performed a couple of test releases with it, and am confused at the
> moment about--fortunately--only one thing.
>
> My pom has an <scm> section.  My project, which is currently versioned at
> 1.2-SNAPSHOT, is under Subversion.
>
> My question is: **after** a release, what, ideally, should be the value for
> the <developerConnection> element?  Should it, for example, end in "trunk"?
> Recall that after the release there will have been a "tagging" operation,
> and the "real" version of my project will live under the Subversion URL
> fragment "tags/1.2".  So do I just leave the <developerConnection> alone?
> Does the maven-release-plugin get smart here and try to modify this for me?
>
> Thanks,
> Laird
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org