-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Issue
There is a Java Module classloading issue using the maven resolver and Quarkus:dev as command works using java -jar ...but fails withquarkus:dev`
java.lang.LinkageError: loader constraint violation: when resolving method 'void org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory.<init>(org.eclipse.aether.spi.connector.checksum.ChecksumAlgorithmFactorySelector)' the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @3a6bb9bf of the current class, org/eclipse/aether/supplier/RepositorySystemSupplier, and the class loader 'app' for the method's defining class, org/eclipse/aether/internal/impl/Maven2RepositoryLayoutFactory, have different Class objects for the type org/eclipse/aether/spi/connector/checksum/ChecksumAlgorithmFactorySelector used in the signature (org.eclipse.aether.supplier.RepositorySystemSupplier is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @3a6bb9bf, parent loader 'app'; org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory is in unnamed module of loader 'app') at org.eclipse.aether.supplier.RepositorySystemSupplier.getRepositoryLayoutFactories(RepositorySystemSupplier.java:223) at org.eclipse.aether.supplier.RepositorySystemSupplier.get(RepositorySystemSupplier.java:541)
The fix is to set the following property quarkus.class-loading.parent-first-artifacts=org.apache.maven.resolver:maven-resolver-supplier,org.apache.maven.resolver:maven-resolver-transport-file