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 154497 - [codehaus] Mevenide does not recognize custome generated-soruces directories
Summary: [codehaus] Mevenide does not recognize custome generated-soruces directories
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 16:03 UTC by Jaromir Uhrik
Modified: 2009-11-02 11:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2008-12-03 16:03:08 UTC
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.
Comment 1 Milos Kleint 2009-02-13 10:09:16 UTC
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)

Comment 2 Quality Engineering 2009-11-02 11:03:05 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX