我有一个名为 src/it/java 的新测试工具(用于集成测试)。 我将其添加到我的 pom.xml 中(在我的简单示例应用程序中)
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/it/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
但是,当我在 intellij 中打开我的项目(通过在 intellij 中打开 pom.xml)时,src/it/java 不会被视为源文件夹。
我应该在 pom.xml 中添加什么以使 intellij 将 src/it/java 识别为源文件夹
谢谢
最佳答案
对于插件配置的路径,您应该运行生成源和更新文件夹,see the FAQ .
关于eclipse - 打开项目为 pom.xml 时,将 src/it/java 添加为 intellij 中的测试文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7316353/