Skip to content

Integration tests require Java 8 due to reflection access #22

@headius

Description

@headius

There's at least one integration test that depends on making a core JDK method (Object.finalize) accessible. This prevents the integration tests from running on most recent versions of Java.

[INFO] Reactor Summary for Mavengem Protocol and Mavengem Wagon 2.0.4-SNAPSHOT:
[INFO] 
[INFO] Mavengem Protocol and Mavengem Wagon ............... SUCCESS [  0.442 s]
[INFO] Rubygems Tools ..................................... SUCCESS [ 39.098 s]
[INFO] Protocol Handler for Mavengem: ..................... SUCCESS [ 15.830 s]
[INFO] Mavengem Protocol Wagon ............................ FAILURE [  0.880 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  56.477 s
[INFO] Finished at: 2026-03-29T22:14:38-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:2.0.0:run (integration-test) on project mavengem-wagon: Execution integration-test of goal org.apache.maven.plugins:maven-invoker-plugin:2.0.0:run failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-invoker-plugin:2.0.0:run: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-invoker-plugin:2.0.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/headius/.m2/repository/org/apache/maven/plugins/maven-invoker-plugin/2.0.0/maven-invoker-plugin-2.0.0.jar
[ERROR] urls[1] = file:/Users/headius/.m2/repository/org/apache/maven/shared/maven-invoker/2.2/maven-invoker-2.2.jar
...
[ERROR] urls[46] = file:/Users/headius/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[47] = file:/Users/headius/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar
[ERROR] urls[48] = file:/Users/headius/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>org.jruby.maven:mavengem:2.0.4-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not "opens java.lang" to unnamed module @3d3a8c69
[ERROR] -> [Help 1]
[ERROR] 

If this test is still valid, it should be updated to avoid such reflection access when running on inaccessible Java versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions