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

${basedir} and ${project.basedir} do not behave the same on file-based profile activation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.5, 3.1.1, 3.2.1
    • 3.2.2
    • None
    • None

    Description

      According to http://maven.apache.org/ref/3.1.1/maven-model-builder/, the ${basedir} property is deprecated and replaced by ${project.basedir}. However the two are not the same. Consider the attached pom.

      When using ${basedir}/pom.xml in profile activation, running "help:active-profiles" will list

      • profile-test (source: pom)

      When using ${project.basedir}/pom.xml, it will not list the profile as activated.

      It seems that the ${project.<xxx>} properties get set after profile activation and evaluation (which makes sense because the profiles might affect these values), but profile activation requires them to be set before that has happened.

      Attachments

        1. pom.xml
          0.6 kB
          hgschmie

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              henning Henning Schmiedehausen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: