You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Carl Johansson (JIRA)" <ji...@codehaus.org> on 2007/07/02 19:56:13 UTC

[jira] Commented: (MNG-1957) clause in the activation section has to provide more complex expressions.

    [ http://jira.codehaus.org/browse/MNG-1957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101065 ] 

Carl Johansson commented on MNG-1957:
-------------------------------------

I just had brief look at the code and to me, implementing VersionRange-like syntax, comes down to three choices:

* Use the existing VersionRange classes (which seems rather artifact dependendant, at least when it comes to naming. It's coupled with, for example, ArtifactVersion)
* Copy the VersionRange class and make it compatible with the problem with try to solve here (code duplication? :)
* Make VersionRange more abstract, make it handle different types versions. Such as Java JDK versions? They are a bit special since they use '_' to denote upgrade releases. But if you'd really like to use the VersionRange class, I guess you can trick it to handle JDK versions like ArtifactVersions (upgrade number can become build number).

I'm rather new to the Maven source code, so I'm in need of some guidance on this.




> <jdk></jdk> clause in the activation section has to provide more complex expressions.
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-1957
>                 URL: http://jira.codehaus.org/browse/MNG-1957
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: POM
>    Affects Versions: 2.0, 2.0.1
>            Reporter: Trustin Lee
>             Fix For: 2.0.x
>
>
> For now, <jdk></jdk> provides only one operator '!' which means negation, but it would be great if i can use '+' and ~ operator:
> <jdk>1.5+</jdk>  <!-- this will be activated when the current JDK version is 1.5 or above (e.g. 1.6) -->
> <jdk>1.1 ~ 1.4</jdk> <!-- this will be activated when the current JDK version is between 1.1 and 1.4 -->
> <jdk>~ 1.3</jdk> <!-- this will be activated when the current JDK version is 1.3 or below -->
> <jdk>1.4 ~</jdk. <!-- the same with 1.5+ -->

-- 
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