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.
Summary: | Better support for build-helper-maven-plugin plugin - sources added via "add-test-source" cannot be refactored AND add-test-resource is not supported | ||
---|---|---|---|
Product: | projects | Reporter: | Michel Graciano <hmichel> |
Component: | Maven | Assignee: | Tomas Stupka <tstupka> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | janario, markiewb, misterm, rodrigorsantos |
Priority: | P3 | ||
Version: | 7.3.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | Sample project |
I think the configuration of build-helper-maven-plugin.add-test-source plugin would be helpful I tried it. a) add-test-resource is not recognized b) but <execution> <id>add-test-source</id> <goals> <goal>add-test-source</goal> </goals> <configuration> <sources> <source>src/test-integration/java</source> <source>src/test-integration/resources</source> </sources> </configuration> </execution> shows at least "Generated Test Sources (java)"/ "Generated Test Sourced (resources)" nodes in the project tree. And yes you cannot do any refactoring (Move/Copy/Refactoring hints) in classes below those nodes -> that is the issue you are reporting Product Version: NetBeans IDE 8.0 (Build 201403101706) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) So somehow related to https://netbeans.org/bugzilla/show_bug.cgi?id=198650#c5 This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss Still valid in 8.2 dev Product Version: NetBeans IDE Dev (Build 201607100002) Additional Test sources are not detected as test sources! |
Created attachment 135778 [details] Sample project I have been developing some ideas at our Maven project and I tried to separate integration from unit tests using build-helper-maven-plugin.add-test-source plugin. But for my surprise the 'Generated Test Sources' which NetBeans maps these folder are not recognized by the IDE as a valid source root, so I don't have a lot of features as: Refactoring: If I try to refactor the package of some classes I have manually moved to there, the refactoring just generate wrong files. Wizards: I am not able to create new classes and packages at these new folders. It is true too for Tools > 'Create Tests', where I can't select these new mapped folders as test folders. I have create a simple project where you can reproduce the issues. AFAIK, basically these folder are just recognized by the compiler as dependencies but not as valid source roots, what is not true IMHO. Product Version: NetBeans IDE 7.3.1 RC (Build 201305162200) Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11