[MNG-8228] Enable Sisu Plexus strict classpath scanning (#1688)

This was introduced with
https://github.com/eclipse-sisu/sisu.plexus/issues/51.

This leads to exceptions in case of issues with loading potential
extensions/plexus components instead of logging just with DEBUG level.
This commit is contained in:
Konrad Windszus 2024-08-29 19:42:56 +02:00 committed by GitHub
parent 57082737d8
commit 3f430bbd07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -672,6 +672,7 @@ public class MavenCli {
.setClassPathScanning(PlexusConstants.SCANNING_INDEX) .setClassPathScanning(PlexusConstants.SCANNING_INDEX)
.setAutoWiring(true) .setAutoWiring(true)
.setJSR250Lifecycle(true) .setJSR250Lifecycle(true)
.setStrictClassPathScanning(true)
.setName("maven"); .setName("maven");
Set<String> exportedArtifacts = new HashSet<>(coreEntry.getExportedArtifacts()); Set<String> exportedArtifacts = new HashSet<>(coreEntry.getExportedArtifacts());
@ -780,6 +781,7 @@ public class MavenCli {
.setClassPathScanning(PlexusConstants.SCANNING_INDEX) // .setClassPathScanning(PlexusConstants.SCANNING_INDEX) //
.setAutoWiring(true) // .setAutoWiring(true) //
.setJSR250Lifecycle(true) // .setJSR250Lifecycle(true) //
.setStrictClassPathScanning(true) //
.setName("maven"); .setName("maven");
DefaultPlexusContainer container = new DefaultPlexusContainer(cc, new AbstractModule() { DefaultPlexusContainer container = new DefaultPlexusContainer(cc, new AbstractModule() {