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

dependencyManagament dependencies within profiles are not activated by settings.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 2.2.1, 3.0-alpha-7
    • None
    • None
    • None
    • Windows XP

    Description

      This issue is not reproducable with Maven 2.0.9, 2.0.10 and 2.2.2-RC1-SNAPSHOT.

      I'm referring to the sample projects contained in profileBug.zip:
      preparation:

      • You need to set in your settings.xml:

      <activeProfiles>
      <activeProfile>testing</activeProfile>
      </activeProfiles>

      • Install main-parent

      reproducing:

      • Install project parent. This will fail because of ChildTwo.

      The transivite dependency of junit is not beeing resolved correctly through project ChildOne even it's not necessary. I guess not finding commons-lang is just a "sequence error" of the "invalid" pom of ChildOne.

      It seems like the profile isn't activated by the settings.xml and so the dependencies aren't known in context of project ChildTwo transitive dependencies.
      But e.g. childOne or childThree can be installed without any problems so the profile should be loaded correctly, the only difference to ChildTwo is that they don't have any transitive dependencies to other projects with the same parent.

      If you cange in project parent the profile "testing" to:

      <activation>
      <activeByDefault>true</activeByDefault>
      </activation>

      or change the profile activation by property and install project parent with -Dtesting, childTwo will be installed correctly.

      This issue only occurs with maven 3.0 or 2.2.1. It works fine with maven 2.0.10 or 2.2.2-RC1-SNAPSHOT

      Will this error be fixed in maven 3.0?

      Attachments

        1. profileBug.zip
          21 kB
          Christian Moser

        Issue Links

          Activity

            People

              brett Brett Porter
              onmomo Christian Moser
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: