Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4983

OS family detection incorrect when setting a profile on OSX

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.0.2
    • None
    • Profiles
    • None
    • OSX 10.6

    Description

      If I run mvn -version on OSX, the result is:

      Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
      Java version: 1.6.0_22, vendor: Apple Inc.
      Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
      Default locale: en_US, platform encoding: MacRoman
      OS name: "mac os x", version: "10.6.6", arch: "x86_64", family: "mac"

      However, when running my actual project, a profile is being incorrectly set when I use OS family detection:

      <profiles>
      <profile>
      <id>win-build</id>
      <activation>
      <os>
      <family>windows</family>
      </os>
      </activation>
      <properties>
      <os.packaging>exe</os.packaging>
      </properties>
      </profile>
      <profile>
      <id>osx-build</id>
      <activation>
      <os>
      <family>mac</family>
      </os>
      </activation>
      <properties>
      <os.packaging>dmg</os.packaging>
      </properties>
      </profile>
      <profile>
      <id>tux-build</id>
      <activation>
      <os>
      <family>unix</family>
      </os>
      </activation>
      <properties>
      <os.packaging>deb</os.packaging>
      </properties>
      </profile>
      </profiles>

      When I run mvn help:active-profiles, I'm getting both osx-build and tux-build profiles being activated:

      The following profiles are active:

      • osx-build (source: pom)
      • tux-build (source: pom)
      • sli-profile (source: settings.xml)

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            muamw10 Andrew Westberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: