You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by JS Bournival <js...@jipiju.com> on 2010/01/29 22:06:43 UTC

automating maven release plugin tag label

Hi maven people,

We have projects we want to release using the maven-release-plugin.  Moreover, we want to perform our releases in Hudson, with the help of the M2release (hudson) plugin.  This is a dream come true:  perform a release on a single push of a button (actually, more of a link).

Now, to do this without fiddling with the version number, I need to be able to rely on conventions:  

- releaseVersion is OK (defaults to ex. 1.0.0)
- developmentVersion is OK (defaults to ex. 1.0.1-SNAPSHOT)
- tagBase is OK (I can specify it directly in the POM)

The value causing me trouble is the release tag label.  I would have liked to have it this way:

<project ...>
    <version>1.0.0-SNAPSHOT</version>
...
  <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-release-plugin</artifactId>
	<configuration>
		<tag>release-${pom.version}</tag>
...
</project>

But, this gives me a SCM tag with the '-SNAPSHOT' suffix.  Not good.  And I don't want to explicitly mention the version in the Hudson job configuration.

Is there a way I can get the tag label to use the correct release version?

Thank you for your answers.

-- 
JS.


Re: automating maven release plugin tag label

Posted by JS <js...@gmail.com>.
ok but what if you want to override the default tag label?  The  
default one is ${project.artifactId}-<release version>.

is there a way in the pom to retrieve the release version as set by  
the maven-release-plugin?

--
JS.
----------------------

Le 2010-01-29 à 17:05, Kalle Korhonen <ka...@gmail.com> a  
écrit :

> Are you not using standard SVN directory layout or no SVN at all? We
> do fully automated releases with mvn -B release:prepare
> release:perform and it gets the tagname etc. right without any special
> configuration. As a sidenote, pom.version is deprecated, use
> project.version instead.
>
> Kalle
>
>
> On Fri, Jan 29, 2010 at 1:06 PM, JS Bournival <js...@jipiju.com> wrote:
>> Hi maven people,
>>
>> We have projects we want to release using the maven-release- 
>> plugin.  Moreover, we want to perform our releases in Hudson, with  
>> the help of the M2release (hudson) plugin.  This is a dream come  
>> true:  perform a release on a single push of a button (actually,  
>> more of a link).
>>
>> Now, to do this without fiddling with the version number, I need to  
>> be able to rely on conventions:
>>
>> - releaseVersion is OK (defaults to ex. 1.0.0)
>> - developmentVersion is OK (defaults to ex. 1.0.1-SNAPSHOT)
>> - tagBase is OK (I can specify it directly in the POM)
>>
>> The value causing me trouble is the release tag label.  I would  
>> have liked to have it this way:
>>
>> <project ...>
>>    <version>1.0.0-SNAPSHOT</version>
>> ...
>>  <plugin>
>>        <groupId>org.apache.maven.plugins</groupId>
>>        <artifactId>maven-release-plugin</artifactId>
>>        <configuration>
>>                <tag>release-${pom.version}</tag>
>> ...
>> </project>
>>
>> But, this gives me a SCM tag with the '-SNAPSHOT' suffix.  Not  
>> good.  And I don't want to explicitly mention the version in the  
>> Hudson job configuration.
>>
>> Is there a way I can get the tag label to use the correct release  
>> version?
>>
>> Thank you for your answers.
>>
>> --
>> JS.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: automating maven release plugin tag label

Posted by Kalle Korhonen <ka...@gmail.com>.
Are you not using standard SVN directory layout or no SVN at all? We
do fully automated releases with mvn -B release:prepare
release:perform and it gets the tagname etc. right without any special
configuration. As a sidenote, pom.version is deprecated, use
project.version instead.

Kalle


On Fri, Jan 29, 2010 at 1:06 PM, JS Bournival <js...@jipiju.com> wrote:
> Hi maven people,
>
> We have projects we want to release using the maven-release-plugin.  Moreover, we want to perform our releases in Hudson, with the help of the M2release (hudson) plugin.  This is a dream come true:  perform a release on a single push of a button (actually, more of a link).
>
> Now, to do this without fiddling with the version number, I need to be able to rely on conventions:
>
> - releaseVersion is OK (defaults to ex. 1.0.0)
> - developmentVersion is OK (defaults to ex. 1.0.1-SNAPSHOT)
> - tagBase is OK (I can specify it directly in the POM)
>
> The value causing me trouble is the release tag label.  I would have liked to have it this way:
>
> <project ...>
>    <version>1.0.0-SNAPSHOT</version>
> ...
>  <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-release-plugin</artifactId>
>        <configuration>
>                <tag>release-${pom.version}</tag>
> ...
> </project>
>
> But, this gives me a SCM tag with the '-SNAPSHOT' suffix.  Not good.  And I don't want to explicitly mention the version in the Hudson job configuration.
>
> Is there a way I can get the tag label to use the correct release version?
>
> Thank you for your answers.
>
> --
> JS.
>
>

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