在执行任何任意的mvn命令时,我会在日志开头收到以下警告:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Run Code Online (Sandbox Code Playgroud)
不幸的是,这些警告有时会导致运行时错误并中断我的maven命令执行。有谁知道如何解决这个问题并摆脱这些警告?
我的Maven版本:
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 11.0.2, vendor: Azul Systems, Inc.
Java home: /usr/lib/jvm/zulu-11-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", …Run Code Online (Sandbox Code Playgroud)