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

Profile option doesn't activate selected profile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.8.5
    • None
    • Profiles
    • None

    Description

      Hi! On maven 3.8.5 using -P profile option doesn't activate selected profile.

      Steps to reproduce

      On project https://github.com/StoneToken/workflow-engines-load-test/blob/master/kogito-bpmn-async

      1. install maven 3.8.5
      2. mvn --version -> 3.8.5
      3. mvn clean package -P postgresql | grep usePersistence produces build with out required dependencies -> AddonsConfig{usePersistence=false

      For e.g. on maven 3.8.1

      1. mvn clean package -P postgresql | grep usePersistence produces build with expected  dependencies -> AddonsConfig{usePersistence=true

      Expected behavior

      Using mvn clean package -P profile explicitly activates profile "profile" as stated in https://maven.apache.org/guides/introduction/introduction-to-profiles.html:

      Profiles can be explicitly specified using the -P command line flag.

      This flag is followed by a comma-delimited list of profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <activeProfiles> section in settings.xml.

      System info

      [INFO] Detecting the operating system and CPU architecture
      [INFO] ------------------------------------------------------------------------
      [INFO] os.detected.name: linux
      [INFO] os.detected.arch: x86_64
      [INFO] os.detected.version: 5.17
      [INFO] os.detected.version.major: 5
      [INFO] os.detected.version.minor: 17
      [INFO] os.detected.release: fedora
      [INFO] os.detected.release.version: 36
      [INFO] os.detected.release.like.fedora: true
      [INFO] os.detected.classifier: linux-x86_64

      openjdk 18.0.1 2022-04-19
      OpenJDK Runtime Environment Homebrew (build 18.0.1+0)
      OpenJDK 64-Bit Server VM Homebrew (build 18.0.1+0, mixed mode, sharing)

       

      Attachments

        1. debug.log
          1.33 MB
          Yury Remishevsky
        2. build.log
          6 kB
          Yury Remishevsky
        3. log-active.log
          2 kB
          Yury Remishevsky
        4. log-all.log
          4 kB
          Yury Remishevsky

        Activity

          People

            Unassigned Unassigned
            yremishevsky Yury Remishevsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: