我有一个使用 MavenInvokerAPI 调用 Maven 运行的插件。一切正常,但我的 Maven 控制台输出中确实有此警告。
[WARN] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
我在构建过程中不需要交互,并且基于 Javadoc setInputStream()
,我将我的设置inputStream
为null
,但我再次收到此警告:
/**
* Sets the input stream used to provide input for the invoked Maven build. This is in particular useful when
* invoking Maven in interactive mode.
*
* @param inputStream The input stream used to provide input for the invoked Maven build, may be <code>null</code>
* if not required.
* @return This invoker instance.
*/
Invoker setInputStream( InputStream inputStream );
我该如何解决这个问题?或者也许隐藏控制台的警告?