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

时间:2010-01-07 17:14:03

标签: maven-2

当您使用-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 --

(f)和(s)之间有什么区别?

1 个答案:

答案 0 :(得分:8)

有趣的问题。我从来没有注意过这个小细节,也找不到任何文件。所以我很喜欢这些资源,这是我们在o.a.m.p.DebugConfigurationListener(来自maven-core)中可以看到的:

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)之间的区别应该是自我解释(叹气)。