Cyrille Le Clerc opened MNG-8217 and commented
The {}@PreDestroy{`}` method of JSR 330 based Maven extensions fail with a {}ClassNotFoundException{} when the extension is declared through the {}<build><extensions>...</extensions></build>{`}`. The problem doesn't happen when the Maven extension is declared through the {}.mvn/extensions.xml{} file or ``{}mvn -Dmaven.ext.class.path=...{} command line arg.
This suggest the classes of the extension are unloaded too early, before {}@PreDestroy{`}` is invoked, when when the extension is declared through the {}<build><extensions>...</extensions></build>{}.
Test case:
This problem impact the OpenTelemetry Maven Extension: opentelemetry-maven-extension NoClassDefFoundError while running package #1391
Affects: 3.9.8
Cyrille Le Clerc opened MNG-8217 and commented
The
{}@PreDestroy{`}` method of JSR 330 based Maven extensions fail with a{}ClassNotFoundException{}when the extension is declared through the{}<build><extensions>...</extensions></build>{`}`. The problem doesn't happen when the Maven extension is declared through the{}.mvn/extensions.xml{}file or ``{}mvn -Dmaven.ext.class.path=...{}command line arg.This suggest the classes of the extension are unloaded too early, before
{}@PreDestroy{`}` is invoked, when when the extension is declared through the{}<build><extensions>...</extensions></build>{}.Test case:
This problem impact the OpenTelemetry Maven Extension: opentelemetry-maven-extension NoClassDefFoundError while running package #1391
Affects: 3.9.8