You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Simone Bordet (JIRA)" <ji...@codehaus.org> on 2011/01/30 17:08:57 UTC

[jira] Commented: (MNG-4760) Way to activate profile based on Maven version

    [ http://jira.codehaus.org/browse/MNG-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253508#action_253508 ] 

Simone Bordet  commented on MNG-4760:
-------------------------------------

In Maven2 I normally added to my builds the "requirePluginVersions" rule in the Maven enforcer plugin.
This is not needed anymore in Maven3, that spits:

[WARNING] This rule is not compatible with the current version of Maven. The rule is not able to perform any checks.

So it would be good to have the enforcer plugin in a profile that is activated only for Maven2 and not for Maven3.

> Way to activate profile based on Maven version
> ----------------------------------------------
>
>                 Key: MNG-4760
>                 URL: http://jira.codehaus.org/browse/MNG-4760
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Profiles
>    Affects Versions: 3.0-beta-2
>         Environment: n/a
>            Reporter: Anders Hammar
>             Fix For: Issues to be reviewed for 3.x
>
>
> A profile activation that checks the version of Maven being used would be good. For example, the site plugin requires a different version when Maven 3 is used. Currently, this is done through a profile that activates based on teh fact that the basedir expression is only recognized by Maven 3.x, which is IMO a not-so-pretty solution. (See https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+and+site+plugin#Maven3.xandsiteplugin-Usingmavensiteplugin2.xwithMaven2.xandmavensiteplugin3.xwithMaven3.x)

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