Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build problems with Maven 3.9.0 and missing BasicRepositoryConnectorFactory #458

Closed
taranion opened this issue Feb 21, 2023 · 4 comments · Fixed by #459
Closed

Build problems with Maven 3.9.0 and missing BasicRepositoryConnectorFactory #458

taranion opened this issue Feb 21, 2023 · 4 comments · Fixed by #459

Comments

@taranion
Copy link

In the last two weeks Github Actions has been updated to use Maven 3.9.0 and now previously working jobs using the gluonfx-maven-plugin fail with

Error:  Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:compile (default-cli) on project commlink6: Execution default-cli of goal com.gluonhq:gluonfx-maven-plugin:1.0.16:compile failed: A required class was missing while executing com.gluonhq:gluonfx-maven-plugin:1.0.16:compile: org/eclipse/aether/connector/basic/BasicRepositoryConnectorFactory
Error:  -----------------------------------------------------
Error:  realm =    plugin>com.gluonhq:gluonfx-maven-plugin:1.0.16

It seems to be related to this discussion here

Older versions of Maven still work fine.

@credmond
Copy link

credmond commented Mar 2, 2023

Yeah, more here: actions/runner-images#7216

Seem that it's an intentional breaking change and can be fixed by failing plugins, such as this one, by upgrading some Maven plugin libs.

gluonfx-maven-plugin and the substrate use some pretty old libraries.

@jperedadnr
Copy link
Contributor

@credmond I bumped all versions in the plugin, but that doesn't seem to fix the issue.

Either org.eclipse.aether:aether-connector-basic:1.1.0 or org.apache.maven.resolver:maven-resolver-connector-basic:1.9.6 are provided by Maven core, and therefore they are not added to the class realm, hence the issue can't be fixed by just adding the dependency (which works with plexus-utils for impsort because it is not provided):

java.lang.ClassNotFoundException: org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
    at com.gluonhq.utils.MavenArtifactResolver.createRepositorySystem (MavenArtifactResolver.java:154)

I also see that MavenRepositorySystemUtils.newServiceLocator() is deprecated (and very recently even removed for Maven 4.0+), so probably we should get rid of this, which implies finding out an alternative to get a repositorySystem ...

Any suggestions are welcome!

@Hitzui
Copy link

Hitzui commented Mar 13, 2023

i have the same problem while trying to compile and create windows executable.
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:nativerun (default-cli) on project densimetro: Execution default-cli of goal com.gluonhq:gluonfx-maven-plugin:1.0.16:nativerun failed: A required class was missing while executing com.gluonhq:gluonfx-maven-plugin:1.0.16:nativerun: org/eclipse/aether/connector/basic/BasicRepositoryConnectorFactory [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>com.gluonhq:gluonfx-maven-plugin:1.0.16 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/C:/Users/Informatica/.m2/repository/com/gluonhq/gluonfx-maven-plugin/1.0.16/gluonfx-maven-plugin-1.0.16.jar [ERROR] urls[1] = file:/C:/Users/Informatica/.m2/repository/com/gluonhq/substrate/0.0.56/substrate-0.0.56.jar [ERROR] urls[2] = file:/C:/Users/Informatica/.m2/repository/com/googlecode/plist/dd-plist/1.23/dd-plist-1.23.jar [ERROR] urls[3] = file:/C:/Users/Informatica/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.49/bcpkix-jdk15on-1.49.jar [ERROR] urls[4] = file:/C:/Users/Informatica/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.49/bcprov-jdk15on-1.49.jar [ERROR] urls[5] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/nativeimage/svm/21.1.0/svm-21.1.0.jar [ERROR] urls[6] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/nativeimage/svm-hosted-native-linux-amd64/21.1.0/svm-hosted-native-linux-amd64-21.1.0.tar.gz [ERROR] urls[7] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/nativeimage/svm-hosted-native-darwin-amd64/21.1.0/svm-hosted-native-darwin-amd64-21.1.0.tar.gz [ERROR] urls[8] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/nativeimage/svm-hosted-native-windows-amd64/21.1.0/svm-hosted-native-windows-amd64-21.1.0.tar.gz [ERROR] urls[9] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/sdk/graal-sdk/21.1.0/graal-sdk-21.1.0.jar [ERROR] urls[10] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/nativeimage/objectfile/21.1.0/objectfile-21.1.0.jar [ERROR] urls[11] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/nativeimage/pointsto/21.1.0/pointsto-21.1.0.jar [ERROR] urls[12] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/compiler/compiler/21.1.0/compiler-21.1.0.jar [ERROR] urls[13] = file:/C:/Users/Informatica/.m2/repository/org/graalvm/truffle/truffle-api/21.1.0/truffle-api-21.1.0.jar [ERROR] urls[14] = file:/C:/Users/Informatica/.m2/repository/org/apidesign/bck2brwsr/aot/0.53/aot-0.53.jar [ERROR] urls[15] = file:/C:/Users/Informatica/.m2/repository/org/apidesign/bck2brwsr/vm4brwsr/0.53/vm4brwsr-0.53.jar [ERROR] urls[16] = file:/C:/Users/Informatica/.m2/repository/org/apidesign/bck2brwsr/core/0.53/core-0.53.jar [ERROR] urls[17] = file:/C:/Users/Informatica/.m2/repository/com/google/javascript/closure-compiler/v20210601/closure-compiler-v20210601.jar [ERROR] urls[18] = file:/C:/Users/Informatica/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar [ERROR] urls[19] = file:/C:/Users/Informatica/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar [ERROR] urls[20] = file:/C:/Users/Informatica/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar [ERROR] urls[21] = file:/C:/Users/Informatica/.m2/repository/org/codehaus/plexus/plexus-java/0.9.11/plexus-java-0.9.11.jar [ERROR] urls[22] = file:/C:/Users/Informatica/.m2/repository/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.jar [ERROR] urls[23] = file:/C:/Users/Informatica/.m2/repository/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar [ERROR] urls[24] = file:/C:/Users/Informatica/.m2/repository/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar [ERROR] urls[25] = file:/C:/Users/Informatica/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.25/plexus-interpolation-1.25.jar [ERROR] urls[26] = file:/C:/Users/Informatica/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar [ERROR] urls[27] = file:/C:/Users/Informatica/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] urls[28] = file:/C:/Users/Informatica/.m2/repository/org/apache/maven/maven-builder-support/3.6.0/maven-builder-support-3.6.0.jar [ERROR] urls[29] = file:/C:/Users/Informatica/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar [ERROR] urls[30] = file:/C:/Users/Informatica/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar [ERROR] urls[31] = file:/C:/Users/Informatica/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar [ERROR] urls[32] = file:/C:/Users/Informatica/.m2/repository/com/google/inject/guice/4.2.1/guice-4.2.1-no_aop.jar [ERROR] urls[33] = file:/C:/Users/Informatica/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar [ERROR] urls[34] = file:/C:/Users/Informatica/.m2/repository/com/google/guava/guava/25.1-android/guava-25.1-android.jar [ERROR] urls[35] = file:/C:/Users/Informatica/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar [ERROR] urls[36] = file:/C:/Users/Informatica/.m2/repository/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar [ERROR] urls[37] = file:/C:/Users/Informatica/.m2/repository/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar [ERROR] urls[38] = file:/C:/Users/Informatica/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar [ERROR] urls[39] = file:/C:/Users/Informatica/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar [ERROR] urls[40] = file:/C:/Users/Informatica/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar [ERROR] urls[41] = file:/C:/Users/Informatica/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar [ERROR] urls[42] = file:/C:/Users/Informatica/.m2/repository/org/apache/maven/shared/maven-invoker/2.2/maven-invoker-2.2.jar [ERROR] urls[43] = file:/C:/Users/Informatica/.m2/repository/org/eclipse/aether/aether-transport-http/1.1.0/aether-transport-http-1.1.0.jar [ERROR] urls[44] = file:/C:/Users/Informatica/.m2/repository/org/apache/httpcomponents/httpclient/4.3.5/httpclient-4.3.5.jar [ERROR] urls[45] = file:/C:/Users/Informatica/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar [ERROR] urls[46] = file:/C:/Users/Informatica/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar [ERROR] urls[47] = file:/C:/Users/Informatica/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.2/jcl-over-slf4j-1.6.2.jar [ERROR] urls[48] = file:/C:/Users/Informatica/.m2/repository/org/eclipse/aether/aether-transport-file/1.1.0/aether-transport-file-1.1.0.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] : org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory [ERROR] -> [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/PluginContainerException

beatngu13 added a commit to beatngu13/pdf-zoom-wizard that referenced this issue Mar 20, 2023
@credmond
Copy link

What's completed in #459? Has this issue gone? If the Maven version is longer required, shouldn't the warning be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants