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.
Maven projects do not show test sources properly when you set them to be under the target directory. I attached a maven project generated with the quick archetype and edited its pom with: <testSourceDirectory>target/test/java</testSourceDirectory> under build. The line: <testSourceDirectory>src/test/java</testSourceDirectory> obviously works, as it is the default, and it also works if you pick any directory outside of target, like src/test1. But when you try use something underneath ${project.build.directory} the project folder "Test Packages" will only show the default package, not the correct package (see attached image). Was assuming similar functionality as with "generated-sources", like when you use JAXB, which is correctly recognized, but a directory like "target/generated-test-sources", which would seem analogous, does not work. It is an annoying issue because many times, in order to make the build portable, you have to filter test sources in Maven so that the build gets the correct paths (from Maven properties such as ${project.basedir}) especially when you run integration tests. Filtered sources would naturally go under target, but then, if they are not displayed correctly by the IDE, it makes it difficult to do things like debugging those filtered sources. Left the default issue type as defect, as generated-sources works very well, and you are brought to assume that a similar way were available for test sources, but of course, this issue can also be thought of as "enhancement".
Created attachment 111970 [details] dummy maven project created with archetype
Created attachment 111971 [details] screen shot of project view
Created attachment 111972 [details] screenshot of Files view
Already works in NB 7.1. *** This bug has been marked as a duplicate of bug 187595 ***