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.
I am using JAXWS running on a server side - .war file. Client using these webservices is in a .jar file. But the client ignores classes generated from the WSDL. They were generated and are physically on the disk in <proj_name>\target\classes\... However, in editor, usage of these classes are underlined red and in projects/files view there are those exclamations in red circle. Weird is, that I am able to build the project without any problems. What i was unable to do is point NetBeans where those generated classes are. Maybe this is not problem of maven plugin, if it is the case, please reassign as appropriate. Or maybe I am missing something, then please advise me how to fix it ;) I am new to maven and this project was prepared for me by someone else. He prepared pom.xml for the whole project which consists of two modules - server and client, each with its own pom. I used "open project" and pointed at the pom of the whole project. ----- Product Version: NetBeans IDE 6.5 (Build 200811100001) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
Err a little correction. I used "New Project" | "Maven Project with existing POM"
netbeans expects the source files to be generated to "target/generated-sources/<FOO>" where <FOO> is typically a name of the maven plugin. There's no way in maven to declaratively get a list generated source roots, without actually running the build. That's unacceptable from performance point of view, so netbeans is using this convention to resolve the classpath. Most plugins do indeed generate the sources in the above mentioned way. closing as LATER, as we might reevaluate the approach once maven has declarative means of figuring additional, generated source roots.
So if I understand it correctly, if I put my generated classes into "target/generated-sources/<mvn_plugin>", it will work? Isn't it weird, when netbeans generates these classes to \classes by default but in maven project expect the classes to be somewhere else?? I don't see any destination for generated classes in pom, so it IS default in netbeans, isn't it? Building is OK, but there is no way to point IDE to generated classes. In Eclipse you can do that and I think this is a basic feature, don't you?
"Isn't it weird, when netbeans generates these classes to \classes by default but in maven project expect the classes to be somewhere else??" by netbeans you mean probably the ant based project types in netbeans. However maven is independent from netbeans. The target/generated-sources/XXX convetion is a MAVEN convention, not NETBEANS. "I don't see any destination for generated classes in pom, so it IS default in netbeans, isn't it?" No, it's a location that was agreed upon by the various source generating maven plugins as the default location. And it indeed is not declared in the POM. That's what I mentioned above in my comment. When (if) it appears there, I'll be more than happy to read that setting. "Building is OK, but there is no way to point IDE to generated classes. In Eclipse you can do that and I think this is a basic feature, don't you?" building is ok, because your maven plugin injects the path dynamically upon execution. manual configuration has a few disadvantages: 1. the configuration needs to be written somewhere. A lot of people don't like netbeans to write stuff in pom or elsewhere. 2. it needs to be kept in sync manually.
i've added a detailed description on how to configure generated sources in teh Project properties dialog, Sources panel. http://hg.netbeans.org/main/rev/6b9c84e61425
Integrated into 'main-golden', will be available in build *200901160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6b9c84e61425 User: Milos Kleint <mkleint@netbeans.org> Log: #156808 add detailed description on how generated sources are resolved in the Sources panel in the project customizer.
NetBeans.org Migration: changing resolution from LATER to WONTFIX