Monday, August 30, 2010

Re: Unable to find type after change in project structure

Yes, there is a relation (from my understanding).

The GWT compiler first looks for a "ModuleDef.gwt.xml" file, and then,
from that location it looks one package further (by default looking
for a "client" subpackage, but you can specify this in your module
definition GWT xml file) for your client code and entry point class
(if one is defined). So I'm not sure that you can decouple the GWT xml
file package location from your client code like that.

It makes logical sense the way you have it defined, though, so maybe
someone who has more insight as to the inner workings could chime in?


Jason

On Aug 26, 10:26 am, Premkumar <prem.jothim...@gmail.com> wrote:
> Hi All,
>
> I am working on a gwt module that is built using maven build system. I
> had a working module that had the following project structure.
>
> project-name/src/main/java/pkg1/pkg2/pkg3/EntryPoingClass
> project-name/src/man/resources/pkg1/pkg2/ModuleDef.gwt.xml
>
> The module definition was looking like this (I have put only this
> project specific settings here...normal inherits are not specified for
> the sake of brevity)
> ...
> <entry-point class='pkg1.pkg2.pkg3.EntryPointClass'/>
> <source path='pkg3'/>
> ...
>
> I am not a big fan of having sub packages in the resources folder.
> Hence I am trying to change it to something like the following
>
> project-name/src/main/java/pkg1/pkg2/pkg3/EntryPoingClass
> project-name/src/man/resources/ModuleDef.gwt.xml
>
> Also changed the module definition to
> ...
> <entry-point class='pkg1.pkg2.pkg3.EntryPointClass'/>
> <source path='pkg1.pkg2.pkg3'/> <!-- Since the module def is not
> inside any package I am specifying the entire 'client' package here --
>
> ...
>
> After this, invoking gwt compile fails with the following error
>
> Unable to find type "pkg1.pkg2.pkg3.EntryPointClass"
>
> Can anybody tell me if there is any relation between the package
> structure of the EntryPointClass and the module definition package
> structure apart from the fact that the EntryPointClass should be
> inside the 'client' package specified in the module definition (which
> is satisfied here)?
>
> Btw, I could see that the compiled classes are available in the
> classpath when invoking the gwt compiler.
>
> Any help in this regard is greatly appreciated.
>
> Thanks,
> Prem

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment