[ 
http://jira.codehaus.org/browse/MOJO-929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162264#action_162264
 ] 

Brett Okken commented on MOJO-929:
----------------------------------

Changing the '-' to '_' seems like it has some problems. The biggest problem is 
that rpm will compare the versions incorrectly (at least as far as I can 
tell)[1].

For example version 1.0.0_SNAPSHOT will evaluate as newer than 1.0.0 for the 
purpose of an rpm upgrade.

What if we enhanced the plugin to create a default "release" value based on the 
modifier of the project version?
A couple of examples might help here.

A project version of 1.0.0-SNAPSHOT would have a version of 1.0.0 and a release 
of SNAPSHOT<timestamp>. The filename would look like: 
<name>-1.0.0-SNAPSHOT20090123170425.<arch>.rpm 

A project with version of 1.0.0-alpha would have version of 1.0.0 and release 
of alpha. The filename would look like: <name>-1.0.0-alpha.<arch>.rpm.

A project with version of 1.0.0-alpha-2-SNAPSHOT would have version of 1.0.0 
and release of alpha_2_SNAPSHOT. The filename would look like: 
<name>-1.0.0-alpha_2_SNAPSHOT20090123170425.<arch>.rpm 

Finally, a project with the version 1.0.0 would have a version of 1.0.0 and 
release of 1. The filename would look like: <name>-1.0.0-1.<arch>.rpm.

The benefit is that the rpm upgrade would correctly recognize "newer" code. 
1.0.0-aplha is newer than 1.0.0-SNAPSHOT because ascii 'a' is larger than ascii 
'S'. 1.0.0-1 is "newer" than any non-numeric modifier.

The only real problem arises when moving from alpha-2-SNAPSHOT to alpha-2. (The 
rule is that if everything else evaluates the same, the version with more 
components is "newer"). However, this could be handled by appending "_1" to the 
end of the "release" for maven versions that have modifiers other than  
SNAPSHOT (i.e. 1.0.0-alpha-2).

[1] - 
http://linux.derkeiler.com/Newsgroups/comp.os.linux.development.system/2005-12/msg00397.html

> Would be nice with more graceful handling of the release strings used by the 
> maven release plugin
> -------------------------------------------------------------------------------------------------
>
>                 Key: MOJO-929
>                 URL: http://jira.codehaus.org/browse/MOJO-929
>             Project: Mojo
>          Issue Type: Wish
>          Components: rpm
>            Reporter: Chris Searle
>            Priority: Minor
>
> It seems that RPMs have a profound dislike of - in versions. This conflicts 
> somewhat with the -SNAPSHOT ideas in the release plugin.
> It would be nice if we could detect these and handle them so that we could 
> use the actual version variable for the artifact rather than having to code 
> around it - this would help in that we could then avoid changing the pom when 
> releasing a new rpm.
> I'm not sure of the best route - but - we could perhaps create a timestamped 
> version for -SNAPSHOT builds?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to