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

Property replacement in dependency pom no longer works

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.9.7
    • 3.9.8
    • Core
    • None
    • macOS 14.5 (23F79)

    Description

      The problem:{}

      Classifiers in dependency poms are no longer replaced (either due to performing profile activation of a parent pom of the dependency, or not performing replacement of a property).{}

      Steps to reproduce (from https://openjfx.io/openjfx-docs/#maven )

      1. {{m{{{}vn archetype:generate
        -DarchetypeGroupId=org.openjfx -DarchetypeArtifactId=javafx-archetype-simple -DarchetypeVersion=0.0.3 -DgroupId=org.openjfx -DartifactId=sample -Dversion=1.0.0 -Djavafx-version=22.0.1{}}}}}
      2. mvn compile{{{}{}[INFO] Scanning for projects...{}}}[INFO] [INFO] ------------------------< org.openjfx:sample >-----------------------[INFO] Building sample 1.0.0[INFO]   from pom.xml[INFO] --------------------------------[ jar ]--------------------------------Downloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/22.0.1/javafx-controls-22.0.1.pomDownloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/22.0.1/javafx-controls-22.0.1.pom (908 B at 1.9 kB/s)Downloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx/22.0.1/javafx-22.0.1.pomDownloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx/22.0.1/javafx-22.0.1.pom (8.4 kB at 165 kB/s)Downloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1.pomDownloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1.pom (904 B at 21 kB/s)Downloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1.pomDownloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1.pom (749 B at 17 kB/s)Downloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/22.0.1/javafx-controls-22.0.1.jarDownloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/22.0.1/javafx-controls-22.0.1.jar (306 B at 6.8 kB/s)Downloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/22.0.1/javafx-controls-22.0.1-$%7Bjavafx.platform%7D.jarDownloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1.jarDownloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1-$%7Bjavafx.platform%7D.jarDownloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1.jarDownloading from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1-$%7Bjavafx.platform%7D.jarDownloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1.jar (302 B at 2.4 kB/s)Downloaded from central: https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1.jar (306 B at 2.4 kB/s)[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time:  1.378 s[INFO] Finished at: 2024-05-28T10:23:05-06:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal on project sample: Could not resolve dependencies for project org.openjfx:sample:jar:1.0.0: The following artifacts could not be resolved: org.openjfx:javafx-controls:jar:${javafx.platform}:22.0.1 (absent), org.openjfx:javafx-graphics:jar:${javafx.platform}:22.0.1 (absent), org.openjfx:javafx-base:jar:${javafx.platform}:22.0.1 (absent): Could not find artifact org.openjfx:javafx-controls:jar:${javafx.platform}:22.0.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException{{{}{}{}}}

      Workaround:

      Use maven != 3.9.7 (via maven wrapper, or from not updating)

      mvn wrapper:wrapper -Dmaven=3.9.6{{{}{}}}

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              tsmock Taylor Smock
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: