Hi all, I'm currently trying to get gitflow-incremental-builder (GIB) running in a GitHub Action using Maven 3.9.0 (and Java 17).
https://github.com/gitflow-incremental-builder/gitflow-incremental-builder GIB is a maven extension that shall be usable in the following "flavors": 1. as a plugin with <extensions>true</extensions> 2. or as via extensions in pom.xml 3. or as a "core" extension via extension.xml which are all working fine with Maven 3.6.3 and 3.8.7. With 3.9.0 I was initially seeing the following weird exception in 2 of 3 integration tests:
1) [Guice/NullInjectedIntoNonNullable]: null returned by binding at
LocatorWiring
but
UnchangedProjectsRemover.downstreamCalculator(UnchangedProjectsRemover.java:43) is not @Nullable
at LocatorWiring at
UnchangedProjectsRemover.downstreamCalculator(UnchangedProjectsRemover.java:43)
\_ for field downstreamCalculator
The two failing tests are the ones for flavor 1 and 2, meaning that the core extension case did not fail! To add even more confusion: I don't see any issues locally on two different Ubuntu 22.04 systems (one natively and one via WSL2). Anyway, after trying a few other things without luck, I tried adding an explicit dependency to plexus-utils which does fix this general issue! But that brings back another issue I already had before 3.9.0 in a specific use case / code path _and only for the third flavor_ (core extension): java.lang.ClassCastException: class org.codehaus.plexus.util.xml.Xpp3Dom cannot be cast to class org.codehaus.plexus.util.xml.Xpp3Dom Now, with 3.9.0 I can fix this issue by setting the new property in the integration test extension.xml: <classLoadingStrategy>plugin</classLoadingStrategy> But users cannot do that in 3.8.7. Long story short, I don't see how I can cover both 3.8.7 _and_ 3.9.0 for all cases: - If I don't add plexus-utils, I break flavors 1 & 2 with Maven 3.9. I could try to document that users shall add plexus-utils on their own, but that's only possible for the plugin case (flavor 1). - If I add plexus-utils, I break flavor 3 with Maven <=3.8.7 because users cannot set classLoadingStrategy yet and there is also no way to exclude plexus-utils via extension.xml. Am I missing an option? I really don't want to publish two different variants of GIB (one with and one without plexus-utils dependency). It's also way too early to drop support for Maven <=3.9. References: - initial PR: https://github.com/gitflow-incremental-builder/gitflow-incremental-builder/pull/644 - troubleshooting PR: https://github.com/gitflow-incremental-builder/gitflow-incremental-builder/pull/645 Thanks & cheers, Falko