2

是否可以将Maven Invoker 插件配置为登录到 System.out 而不是 build.log 文件?

4

2 回答 2

2

maven-invoker-plugin 有两个参数noLogstreamLog您应该检查其中一个是否满足您的要求。我会假设 streamLog 应该是正确的方向。

于 2013-01-31T08:57:12.260 回答
0

不,他们创建了文件记录器并广泛使用它:

private FileLogger setupLogger( File basedir )
    throws MojoExecutionException
{
    FileLogger logger = null;

    if ( !noLog )
    {
        File outputLog = new File( basedir, "build.log" );
        try
        {
            if ( streamLogs )
            {
                logger = new FileLogger( outputLog, getLog() );
            }
            else
            {
                logger = new FileLogger( outputLog );
            }

            getLog().debug( "build log initialized in: " + outputLog );
        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "Error initializing build logfile in: " + outputLog, e );
        }
    }

    return logger;
}
于 2013-01-31T01:49:04.293 回答