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

add support for ${basedir} property in profile activation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.0.7
    • None
    • Profiles
    • None

    Description

      The profile <activation> supports file based activation (exists/missing), but properties are not supported to set the path.

      My project use such a file-based activation, based on some generated-source file :
      <activation>
      <file>
      <missing>target/generated-sources/sql2java.tstamp</missing>
      </file>
      </activation>

      My project is a module, and when I run the project from the parent project the path is considered based on current dir (parent root) and not module root, so the profile gets activated but shouldn't.

      There's no support for properties in profile activation. I can understand this as profile can themself change properties. Support for the ${basedir} property could solve this issue. As this is a default maven property, it should be immutable, so have no impact on profiles activations and other properties setup.

      I would like to submit a patch, to enhance FileProfileActivator and replace ${basedir} with actual value in isActive, but I don't know where to get the basedir value.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              ndeloof nicolas de loof
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: