Skip to content

Upgrade maven-resolver to 1.9.27 and maven-core to 3.9.16 in plugins-test #14256

Description

@emeroad

Summary

Upgrade the Maven resolver stack used by the plugin integration test harness (agent-module/plugins-test-module/plugins-test).

  • maven-resolver 1.6.3 -> 1.9.27
  • maven-core (maven-resolver-provider, maven-model-builder, ...) 3.8.8 -> 3.9.16, which is the Maven release built against resolver 1.9.27

Changes

  • Replace the DefaultServiceLocator wiring (MavenRepositorySystemUtils.newServiceLocator(), deprecated in resolver 1.9 and removed in 2.0) with RepositorySystemSupplier from maven-resolver-supplier. The supportRemote=false mode is kept by overriding getTransporterFactories to drop the HTTP transporter.
  • Copy the JVM system properties into the RepositorySystemSession. MavenRepositorySystemUtils.newSession() in provider 3.8 did this, 3.9 does not. Without java.version the model builder fails the <jdk> profile activation of every POM it reads (pinpoint parent POM, dropwizard metrics parent POM, ...). Because the descriptor policy ignores invalid descriptors, the failure is silent and every dependency resolves to the root artifact only, so the plugin test class loader ends up with pinpoint-plugins-test.jar alone and fails with NoClassDefFoundError: com/navercorp/pinpoint/profiler/context/module/DefaultApplicationContext. Restoring the copy also restores the ConfigurationProperties.CONNECT_TIMEOUT / REQUEST_TIMEOUT session config that the suite injects through system properties.
  • Remove the unused maven-resolver-transport-wagon and maven-resolver-transport-classpath dependencies. Only the file and http transporters are wired.
  • Add a regression test that checks transitive dependencies are actually resolved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions