Question

I'm trying to define a profile that is activated only in case two conditions fit:

  • a special folder exists
  • the correct operating system

    <profile>
        <id>test</id>
        <activation>
            <file>
                <exists>file</exists>
            </file>
            <os>
                <family>windows/unix/etc...</family>
            </os>
        </activation>
    </profile>
    

I tried to define it that way, but in case the operating system matches the profile is activated, even the folder does not exist. But I want to run some plugins in case the folder exists, in case a binary is required the operating system must match.

Thanks in advance..

Was it helpful?

Solution

According to the Maven JIRA, this is an open issue: http://jira.codehaus.org/browse/MNG-4565

The comments for the above-linked issue point to a Maven extension that provides the functionality you are looking for: https://github.com/johnjcool/and-activation-profile-selector

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top