Configure Mockito to avoid self attachment warning#24094
Conversation
it is in link with https://openjdk.org/jeps/451 the warnings were: ``` Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended WARNING: A Java agent has been loaded dynamically (/home/apupier/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.10/byte-buddy-agent-1.18.10.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release ``` it remains just `OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended` which has a different root cause note that I have not found a JEP for planned removal of the Dynamic Loading of Agents. Anyway, it will allow to be ready and it is mentioned as a bit safer. Signed-off-by: Aurélien Pupier <apupier@ibm.com>
|
Nice if we can remove this warning |
|
hum not the kind of errors that i would have expected with this kind of change...: EDIT: which of course i do not reproduce locally when building directly the maven module in error |
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
⏺ The build fails on bundles-pom with: Error loading supplemental data models: Could not find resource 'target/legal/legal.xml' This is a build infrastructure issue in the bundles-pom module — the maven-remote-resources-plugin can't find target/legal/legal.xml. This is unrelated to the PR's Mockito changes. It failed This is a known pattern in the Camel build — the legal.xml supplemental resource is generated by a prior build step, and if that step is skipped or the build order is off (especially with mvnd |
it is in link with https://openjdk.org/jeps/451
the warnings were:
it remains just
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appendedwhich has a different root causenote that I have not found a JEP for planned removal of the Dynamic Loading of Agents. Anyway, it will allow to be ready and it is mentioned as a bit safer.
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.