Hi Chris,
Dunno if you eventually got this working, but I just tried to do
exactly the same and after lots of combinations finally got it to
work. First to make Eclipse happy you need to include the alternate
project in the build path, which puts it in .classpath. Then, to give
it to the GWT compiler you need to both include the Common.gwt.xml
module in the correct directory, and add the project's source file to
the Run Configuration build path, which puts it in Project.launch. To
be complete, you should also add "../Common/src" to the shell and
compile scripts for invoking it standalone. Here is the final
structure with a common project and another project that uses it:
basedir/
Common/
src/
com.blah.common/
Common.gwt.xml (just <module/>)
com.blah.common.client/
Utils.java
SomeProject/
.classpath (... <classpathentry combineaccessrules="false"
kind="src" path="/Common"/> ...)
SomeProject.launch (see below)
SomeProject-shell (... -cp "../Common/src" ...)
src/
com.blah.someproject/
SomeProject.gwt.xml (... <inherits
name="com.blah.common.Common"/ ...>
com.blah.someproject.client/
Code.java (... import com.blah.common.client.Utils; ...)
SomeProject.launch includes the following:
...
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
...
<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/Common/src" path="3" type="
2"/> "/>
</listAttribute>
Hope this helps, or at least reminds me next time..
jk
On Aug 16, 8:02 am, Chris Tomlinson <[EMAIL PROTECTED]>
wrote:
> Thank you for the reply. I gave it a couple of tries but couldn't get
> it work. Ultimately what I have done is create an independent
> "library" project and put the Utils.java in the xxx.client package
> there. That is really what I was trying to do. Namely, factor out the
> common server and client support elements across several GWT projects.
> I just hadn't realized the idea of a GWT project without an EntryPoint.
>
> On Aug 15, 2008, at 4:07 PM, Dobes wrote:
>
>
>
> > You probably need to put in your Utils.gwt.xml:
>
> > <source path="." includes="Utils.java"/>
>
> > I didn't try this ... but that's how I think that the <source/> tag
> > works. Lookup the <source /> tag in the docs for more information.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---