为什么Maven surefire插件在$ {project.build.directory}中创建了两个surefire *目录?

时间:2012-02-28 08:35:28

标签: maven-2 maven-3 maven-surefire-plugin

我觉得这很烦人。目标文件夹中有两个surefire *目录:

- surefire (empty)
- surefire-reports (containing the output of the tests)

我试过找到删除surefire目录的选项,但我似乎找不到它。 问题是 - 我有其他项目没有这个空目录,只有surefire-reports

我似乎做错了什么,如何删除?我问这个问题的主要原因是这个空目录在控制台中破坏了我的选项卡自动完成功能,这让我很生气,因为目录是空的。

此外,这只是测试插件,而不是报告插件。项目中没有任何部分(不是任何父项)。

这是我的surefire插件设置:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
                <configuration>

                    <excludes>
                        <exclude>**/*Abstr*Test*</exclude>
                    </excludes>
                </configuration>
            </plugin>

提前致谢!

2 个答案:

答案 0 :(得分:1)

这似乎是maven-surefire-plugin中的错误,我在SUREFIRE-846下提交了一份报告。

答案 1 :(得分:0)

“surefire”是在surefire期间创建的临时文件的目录:测试执行。当Maven执行结束时,这些文件将被删除。