[
https://issues.apache.org/jira/browse/MNG-8131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17850418#comment-17850418
]
John Neffenger commented on MNG-8131:
-------------------------------------
??This fact (invalid parent POM is being generated) has been reported several
times to project, without having it addressed.??
Yes, that's how I understand it, Tamás. Thank you again for finding the source
of the issue. The problem was confounded by the fact that the JavaFX project
receiving the bug reports is not the organization that publishes the Maven
artifacts. That's done by an independent company with a build system outside
the project, and I'm not sure whether they received any bug reports directly.
Could Maven consider using this opportunity to provide a faster failure in this
situation? Granted, projects should not publish invalid POM files. At the same
time, it shouldn't take three years to discover the error, and it shouldn't
take Maven developers [a long
investigation|https://lists.apache.org/thread/4dqwyjhcy0ocp4jwlth3brj76wcr428g]
to track down such a trivial mistake.
Could there be a way for Maven to inject a validation step while publishing an
artifact, or perhaps even when downloading a POM file? That seems to be what
the Maven Assembly Plugin is doing, based on the JavaFX bug reports. Many of us
don't use that plugin, though. A direct error message from Maven Core about the
duplicate IDs would have been impossible to ignore.
> Property replacement in dependency pom no longer works
> ------------------------------------------------------
>
> Key: MNG-8131
> URL: https://issues.apache.org/jira/browse/MNG-8131
> Project: Maven
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.9.7
> Environment: macOS 14.5 (23F79)
> Reporter: Taylor Smock
> Priority: Major
>
> h1. 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] )
> # {{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{}}}}}
> # {{{}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.pom{}}}{{{}Downloaded
> 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.pom{}}}{{{}Downloaded
> 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.pom{}}}{{{}Downloaded
> 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.pom{}}}{{{}Downloaded
> 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.jar{}}}{{{}Downloaded
> 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.jar{}}}{{{}Downloading
> from central:
> https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1.jar{}}}{{{}Downloading
> from central:
> https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/22.0.1/javafx-graphics-22.0.1-$%7Bjavafx.platform%7D.jar{}}}{{{}Downloading
> from central:
> https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1.jar{}}}{{{}Downloading
> from central:
> https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/22.0.1/javafx-base-22.0.1-$%7Bjavafx.platform%7D.jar{}}}{{{}Downloaded
> 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{{{}{}}}{}}}
> h1. Workaround:
> Use maven != 3.9.7 (via maven wrapper, or from not updating)
> {{mvn wrapper:wrapper -Dmaven=3.9.6{{{}{}}}}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)