This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
org.codehaus.mojo:build-helper-maven-plugin plugin contains useful goal to include additional sources to the build path. It would be very useful if the netbeans detects the plugin configuration and adds those directories to the project. Eg. <build> <plugins> <!-- Adds mock sources to the tests build tree --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <id>add-mocks-sources</id> <phase>generate-test-sources</phase> <goals> <goal>add-test-source</goal> </goals> <configuration> <sources> <source>src/test/mock</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
we do add build-helper roots for main sources, but don't add any generated source roots to test sources currently
Yes, you are right. I have found that the plugin configuration has to be done outside of execution element. eg: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <id>add-mocks-sources</id> <phase>generate-test-sources</phase> <goals> <goal>add-test-source</goal> </goals> </execution> </executions> <configuration> <sources> <source>src/test/mock</source> </sources> </configuration> </plugin>
the code in netbeans looks first in execution element for "add-sources" goal, if not found uses the generic configuration. In both cases the sources are however put into the main sources group. If the generated sources depend on something from test classpath, you will get error badges in the IDE.
Reassigning to default owner.
*** Bug 192460 has been marked as a duplicate of this bug. ***
Handling this as part of bug #187595, since the code is so closely related. *** This bug has been marked as a duplicate of bug 187595 ***