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.
If I use build-helper-maven-plugin to specify a custom source path like: <source>${project.basedir}/../customsourcefolder</source> NetBeans doesn't recognize the source code within. If I move the source directory into ${project.basedir} and update the custom source path to: <source>${project.basedir}/customsourcefolder</source> NetBeans properly recognizes the source code. NetBeans 6.7 RC3 Windows Server 2008 x64 JDK 1.6.0_14 x64
Created attachment 83977 [details] Simple Maven NetBeans project that easily reproduces issue
http://hg.netbeans.org/main/rev/8adcb69831ae the problem is with "generated" source roots (as the project is using the build helper plugin configuration) and not the <build><sourceDirectory> element in the pom. That one is primarily meant to be used by tools generating sources, I don't see a reason why one should generate sources *outside* of the target/ folder of the project, so you seem to be using it to define multiple source roots for the project which is not a recommended practice in general. the changeset fixes it, by checking the generated source roots for location in or outside of the project root. Please note that in general source roots outside of the project root are considered a corner case and only partially supported (eg. if you change the outside location while the project is opened, you will have to close/reopen the project to have the IDE to notice etc).
Thanks so much! I am working with a large legacy project and I don't have authority to reorganize directories. - There are multiple source roots (human written, non-generated code) - The pom.xml should not be in the root directory. I understand that this structure breaks recommended practice (I wouldn't have organized this way). The corner case limitation sounds quite acceptable for this purpose. Thanks again
Integrated into 'main-golden', will be available in build *200906241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8adcb69831ae User: Milos Kleint <mkleint@netbeans.org> Log: #167572 include generated sources in the list of urls that get checked and registered as external source roots.
This problem is still present in NetBeans 6.7 final with the same test project. This fix was checked in before 6.7 final. Am I misunderstanding the fix or did this somehow not get included?
the target milestone is set to 6.8 which means it's fixed in trunk (future 6.8 version) it was too late to fix at RC times.. I've addded the 67patch-candidate tag to eventually include it in the 6.7.1 patch release..
v.
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/6fdec3b703d3