编译Maven项目时如何隐藏警告?

时间:2020-05-26 01:23:13

标签: java maven

使用mvn clean compilemvn 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
  1. 我知道隐藏警告可能是一个坏习惯,但现在我需要 为此。

  2. 此外,我需要在其他计算机上运行此源代码,并且 我想避免配置任何类路径文件或类似的东西

有可能吗?非常感谢!!!

0 个答案:

没有答案