This post mentions GWT, but actually it seems to be a Netbeans problem
with web projects? I have posted to the Netbeans and GWT forum, but so
far, no replies.   If anyone in the Posse can help, I'll update the
forums and credit whoever solves the problem ;-) ...

--

Using Netbeans 6.1 I wanted to initially try out GWT in a new,
separate project, but re-use some of the existing source from my old
project.  This proved trickier than it sounded, basically Netbeans
would detect that the source was already part of another project and
refuse to add the source to my GWT project (via the Project ->
Properties -> Sources -> Add folder).

I found a different and got it half working, by going to Project ->
Properties -> Libraries -> add jar / folder, I added the folder
containing the source in the other project.  Hey Presto, all my
imports could be resolved - woo hoo.  The problem was, Netbeans was
unable to build the application.  Oddly I could see all the class
files generated in the web-inf classes, but Netbeans wasn't able
to?...

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
Compiling 2 source files to /home/rob/Development/NewFolder/PlainGWT/
build/web/WEB-INF/classes
/home/rob/Development/NewFolder/PlainGWT/src/java/org/abc/server/
Tester.java:7: package com.odl.ccc.db.dto does not exist
import com.odl.eqtrader.db.dto.DbOrders;
/home/rob/Development/NewFolder/PlainGWT/src/java/org/abc/server/
Tester.java:8: package com.odl.eqtrader.db.exceptions does not exist
import com.odl.ccc.db.exceptions.DbOrdersDaoException;

I was aware that GWT needs to handle modules with <source> and more
importantly <super-source> elements to pull in files from a different
location, so to be totally sure it wasn't because of GWT, I moved my
shared code from the 'client' package to the 'server' package - still
problems.  For total confidence I created a brand new 'web' project
and tried the same thing - no GWT in sight.  My new project still
would not pull in the source :-( At least now I know it's not a GWT /
GWT4NB problem.

It seems the recommendation to share code is to put the code to be
shared in a separate 'standard' project, potentially registering it as
a library itself.  Now, call me old fashioned, but that sounds like un-
neccessary hassle.  In fact, I want to re-use the DTO's and some
Spring command objects.  I don't want to create two new projects to
achieve that.  Additionally, I wont always be in control of the source
hiearchy, so this is not always an option.

My current option is to just grow my exiting project, bolting
everything I need - but at this stage I don't want to pollute the
existing project, it's more of a research activity.

Does anyone have any advice on how this 'simple' task can be done
within Netbeans? Or can at least explain why I can compile, but can't
deploy?  Can I add something to the ant build that Netbeans generates
to get past this problem?

Cheers,
Rob.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to