Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-195

activeProfiles element from settings.xml seems to be ignored, property override not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 2.2.0-beta-1
    • 2.0.2
    • maven
    • None
    • Hide
      <activation>
          <activeByDefault>true</activeByDefault>
      </activation>
      
      Show
      <activation> <activeByDefault>true</activeByDefault> </activation>

    Description

      See:
      http://maven.apache.org/settings.html#Active_Profiles

      On the command line (mvn), the element is evaluated as expected and the specified profiles are activated but when I load the very same pom.xml via Maven.resolver().offline().loadPomFromFile(...), the respective profiles are ignored, as it seems.
      I came accross this issue when I wanted to override a property from pom.xml in settings.xml and ParsedPomFile.getProperties() kept returning the non-overriden value.

      Notes:

      • the following in settings.xml does work:
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        
      • a new property defined in a settings.xml profile also doesn't show up in ParsedPomFile.getProperties() which seems to prove that the profile is not actived

      Attachments

        Activity

          People

            kpiwko Karel Piwko
            falko.modler@t-systems.com Falko Modler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: