my gwt.xml has the 2 source pathes <source path="client" /> and <source
path="common" />. This works fine as long as as both packages are in
the same source folder, eg. /src/foo/client and /src/foo/common where
/src is the source folder.
But if I want to use different source folders, such as
/src/client/foo/client and /src/common/foo/common where /src/client
respectively /src/common are the source folders it doesn't work. (Both
folders are in classpath)
Here is the output of my ant task (it's better to copy & paste, but
it's the same in hosted mode)
gwtcompile:
[java] Analyzing source in module foo.bar'
[java] [ERROR] Errors in '/home/tobias/..
.../src/client/foo/client/bar.java'
[java] [ERROR] Line 16: The import foo.common cannot be resolved
[java] [ERROR] Line 43: FooDto cannot be resolved to a type
[java] [ERROR] Line 43: FooDto cannot be resolved to a type
[java] [ERROR] Errors
...
[java] [ERROR] Build failed
Is there a problem with my configuration or doesn't GWTCompiler take
multipe source folders into consideration?
Thanks,
Tobias
What you need to do is create a module for your common code and
inherit it also.
-= Mat
--
Mat Gessel
http://www.asquare.net
For people with the same problem, here is what I did in detail:
added common.gwt.xml:
<module>
<source path="common" />
</module>
to the common source folder (in package foo) and added the line
<inherits name="foo.common"/>
to my old gwt.xml conf file.
That's all.
Tobias
So we've resolved that the common code needs to have a module defined
for it in its src folder
and we know we need to inherit the module in the app.gwt.xml file
but how does the GWT compiler find this common module if it lives
somewhere else?
Don't we need to define a path to this other module somewhere?
If my common code lives in C:\gwtcommon\src, how would I set up my app
to pull in the common module?
thanks, dm