使用mvn clean compile
或mvn exec:java
时,我需要完全隐藏Maven警告。
即使使用mvn clean compile -q
之类的东西,我也会得到以下输出:
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
我知道隐藏警告可能是一个坏习惯,但现在我需要 为此。
此外,我需要在其他计算机上运行此源代码,并且 我想避免配置任何类路径文件或类似的东西
有可能吗?非常感谢!!!