代码之家  ›  专栏  ›  技术社区  ›  Laird Nelson

Maven调试输出:(f)是什么意思?

  •  4
  • Laird Nelson  · 技术社区  · 16 年前

    当您使用-X标志运行Maven 2,并观察它配置插件时,您可能会看到如下输出:

    [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.3:clean' -->
    [DEBUG]   (f) directory = e:\projects\foobar\target
    [DEBUG]   (f) excludeDefaultDirectories = false
    [DEBUG]   (f) failOnError = true
    [DEBUG]   (s) directory = .
    [DEBUG]   (s) includes = [**/*~]
    [DEBUG]   (f) filesets = [file set: . (included: [**/*~], excluded: [])]
    [DEBUG]   (f) followSymLinks = false
    [DEBUG]   (f) outputDirectory = e:\projects\foobar\target\classes
    [DEBUG]   (f) project = MavenProject: foobar:foobar:1.0-SNAPSHOT @ e:\projects\foobar\pom.xml
    [DEBUG]   (f) reportDirectory = e:\projects\foobar\target\site
    [DEBUG]   (f) skip = false
    [DEBUG]   (f) testOutputDirectory = e:\projects\foobar\target\test-classes
    [DEBUG] -- end configuration --
    

    1 回复  |  直到 16 年前
        1
  •  8
  •   Pascal Thivent    16 年前

    有趣的问题。我从来没有注意过这个小细节,也找不到任何关于它的文档。所以我用灰色标出了来源,这就是我们在 o.a.m.p.DebugConfigurationListener

    public void notifyFieldChangeUsingSetter( String fieldName, Object value, Object target )
    {
        if ( logger.isDebugEnabled() )
        {
            logger.debug( "  (s) " + fieldName + " = " + toString( value ) );
        }
    }
    
    public void notifyFieldChangeUsingReflection( String fieldName, Object value, Object target )
    {
        if ( logger.isDebugEnabled() )
        {
            logger.debug( "  (f) " + fieldName + " = " + toString( value ) );
        }
    }
    

    (f)和(s)之间的区别现在应该是自我解释(叹气)。

    推荐文章