You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/17 21:50:21 UTC

[jira] [Commented] (MNG-5909) Activating a profile based on the existence of multiple files is not possible

    [ https://issues.apache.org/jira/browse/MNG-5909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15425449#comment-15425449 ] 

ASF GitHub Bot commented on MNG-5909:
-------------------------------------

GitHub user lbndev opened a pull request:

    https://github.com/apache/maven/pull/92

    MNG-5909 : Add combined expression evaluator to file activation property

    Suggested solution for MNG-5909 : the file activation element will understand basic boolean expressions such as and(file1,file2) or(file3,!file4) etc... Please see added unit test for expression examples.
    If you think this could benefit to other activators (property, os, ...) please say so and I will happily modify them too.
    I will also post a message on maven dev mailing list.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lbndev/maven MNG-5909

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven/pull/92.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #92
    
----
commit 2efe3d2d3b92685d83c2598a7f85c39ebdd59ebc
Author: Loïc B <lb...@yahoo.fr>
Date:   2016-08-16T09:21:52Z

    Add combined expression evaluator to file activation property

----


> Activating a profile based on the existence of multiple files is not possible
> -----------------------------------------------------------------------------
>
>                 Key: MNG-5909
>                 URL: https://issues.apache.org/jira/browse/MNG-5909
>             Project: Maven
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3.3
>            Reporter: Konrad Windszus
>
> Currently each type of activation (os, jdk, file, property) can only be used once for activating a single profile.
> Therefore it is not possible to activate a profile in case two different files are existing, although since Maven 3.2.2 (MNG-4565) it is possible to combine multiple activations of different types.
> Multiple  {{file}} or {{property}} should therefore be supported to allow to express something like:
> Enable {{profileA}} in case both {{fileA}} and {{fileB}} do exists
> For {{jdk}} and {{os}} this is less relevant because all conditions are combined with AND.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)