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 244135 - Sources from generated-sources (in testscope) cannot access classes from generated source root (non-testscope)
Summary: Sources from generated-sources (in testscope) cannot access classes from gene...
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-28 16:07 UTC by markiewb
Modified: 2016-07-07 08:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (123.41 KB, image/png)
2014-04-29 10:49 UTC, Milos Kleint
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2014-04-28 16:07:05 UTC
Related to https://netbeans.org/bugzilla/show_bug.cgi?id=241874

Scenario: A class in target/generated-sources/testmodel tries to access a class from target/generated-sources/bundles. See pom below.

target/generated-sources/bundles is registered as additional source.
target/generated-sources/testmodel is registered as additional test-source


ACTUAL: compile error badges in java files, but maven compiles fine
EXPECTED: 
* no error badges in java files, but the maven compiles fine
* additional test-source roots should "see" the additional source roots


<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
                <execution>
                        <id>add-source</id>
                        <goals>
                                <goal>add-source</goal>
                        </goals>
                        <configuration>
                                <sources>
                                        <source>target/generated-sources/model</source>
                                        <source>src/generator</source>
                                        <source>target/generated-sources/bundles</source>
                                </sources>
                        </configuration>
                </execution>
                <execution>
                        <id>add-test-source</id>
                        <goals>
                                <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                                <sources>
                                        <source>target/generated-sources/testmodel</source>
                                        <!-- Workaround:
                                        <source>target/generated-sources/bundles</source>
                                        -->
                                </sources>
                        </configuration>
                </execution>
        </executions>
</plugin>



Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: Updates available to version NetBeans 8.0 Patch 1
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; de_DE (nb)
User directory: C:\Users\markiewb\AppData\Roaming\NetBeans\8.0
Cache directory: C:\Users\markiewb\AppData\Local\NetBeans\Cache\8.0
Comment 1 Milos Kleint 2014-04-29 10:49:42 UTC
Created attachment 147001 [details]
screenshot

I cannot reproduce, please see the attached screenshot, the classes from the main source generated root can be used in test source generated root without problems, changes in main source root are picked up in test source root as well.
Comment 2 markiewb 2014-04-30 09:31:11 UTC
Strange. I also tried a minimal sample and the error was not reproducible.

But the problem really exists in my real-world-project at work. I will investigate further. (P2->P3)
Comment 3 Martin Balin 2016-07-07 08:39:16 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