我正在尝试在同一个项目中分离单元测试和集成测试。我使用build-helper-maven-plugin配置我的附加源文件夹(用于集成测试),如下所示:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<sources>
<source>${integrationSourceDirectory}</source>
</sources>
<resources>
<resource>
<directory>${integrationResourceDirectory}</directory>
<targetPath>${integrationOutputDirectory}</targetPath>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</pluginManagement>
....
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
</execution>
<execution>
<id>add-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
</execution>
</executions>
</plugin>
当我在netbeans 7.3.1中打开项目时。附加的源文件夹被识别为“生成的源”,我的测试库不包含在此测试文件夹(例如arquillian)中包含的类的类路径中。
如何在netbeans中解决这个问题?
提前感谢您的帮助