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.
This issue was originally reported by Dariusz Kordonski in 02/Oct/08 at codehaus.org - see more details at http://jira.codehaus.org/browse/MEVENIDE-670 Environment: Windows XP SP3 =========== Description: =========== In my project pom.xml I have Antrun plugin defined, which runs Axis WSDL2Java tool and stores generated sources in a directory target/generated-sources/main/java. Using <sourceRoot> element I am able to add this directory to the compiler path before excuting 'compile' phase. Mevenide2 somehow recognizes that and adds 'Generated sources' directory to the project view. The problem is, that it treats 'main' directory within it as the base src location and therefore it adds 'java' prefix to the package name of all the generated classes, which obviously results in errors in NB (package of each generated class does not match). I do not expect mevenide2 to take every single Maven plugin configuration into account when generating source path for project, but there should be at least possibility to e.g. add/correct manually the missing / incorrect src locations (independently from what is provided in pom). Otherwise it is impossible to work in NB / mevenide in suche cases as this. ---------------------------------------------- Comment by Milos Kleint [ 02/Oct/08 11:48 AM ] ---------------------------------------------- in general all source generating plugins in maven generate sources into target/generated-sources/XXX where xxx is the folder name related to the tool. There's so far no way in maven to figure what are the additional source roots without actually running the build. That's unacceptable on project loading in the IDE for performance reasons . The current algorithm is that it iterates the subfolders of target/generated-sources/ and assumes these are source roots. Additionaly (since netbeans 6.5 maven support) we also check the configuration of the build-helper-maven-plugin. In general I would lie to avoid a situation where I need to guess the entire world and check for configuration of tens of plugins. antrun-plugin could be an exception, but not for 6.5. Alternatively maven sould support a way to figure source root without building the project. There will never be any UI to configure the source roots. The POM is the ultimate and only project information source. An obvious solution/workaround is to generate sources to the right directory or use the build-helper plugin to designate the folder you want.
I've added a description to Sources panel in Project properties that describes how generated sources work with maven projects in netbeans. For my part consider the issue fixed until the maven folks add a way to figure generated sources in declarative way (without building the project)
NetBeans.org Migration: changing resolution from LATER to WONTFIX