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.

Bug 231240 - Better support for build-helper-maven-plugin plugin - sources added via "add-test-source" cannot be refactored AND add-test-resource is not supported
Summary: Better support for build-helper-maven-plugin plugin - sources added via "add-...
Status: REOPENED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3.1
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-13 19:50 UTC by Michel Graciano
Modified: 2016-07-10 19:29 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Sample project (4.35 KB, application/zip)
2013-06-13 19:50 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2013-06-13 19:50:16 UTC
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
Comment 1 markiewb 2013-09-11 19:29:51 UTC
I think the configuration of 
build-helper-maven-plugin.add-test-source plugin
would be helpful
Comment 2 markiewb 2014-03-27 19:53:43 UTC
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)
Comment 3 markiewb 2014-03-27 19:58:08 UTC
So somehow related to https://netbeans.org/bugzilla/show_bug.cgi?id=198650#c5
Comment 4 Martin Balin 2016-07-07 08:37:46 UTC
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
Comment 5 markiewb 2016-07-10 19:29:04 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)

Additional Test sources are not detected as test sources!