Hi Sumit Chandel,

Thanks for taking the time to answer my questions!

The Ant setup is heading in the right direction for me. I haven't
figured out how to include other modules in ant. I have figured out
how to include them in the debug configurations, and libraries in
eclipse. I would prefer to use the jar, but I am building both modules
actively, and compiling into a jar and including it would take longer
to develop the project.

http://code.google.com/p/gwt-examples/wiki/module_inherit - my docs so
far in including gwt source modules/projects.

Here are my projects I am experimenting on, and must figure out how to
include them so I can move on.
> http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/Navigation - 
> main project
   > http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/gwt-System
- common widgets


My Goals:
1. configure ant to compile gwt like hosted mode - compile both the
main module and the sub modules
2. copy the module to the main project
3. copy the compiled classes of the other project to the main module


You guys are doing an excelent job with GWT!!!
Thanks,
Brandon


On Mar 5, 1:34 am, Sumit Chandel <[email protected]> wrote:
> Hi Brandon,
> I think the typical way to reuse an existing GWT module in another is to
> package that module into a JAR file (source included) and then refer to the
> module from main project in its module XML file, as you did above. You would
> then add that JAR to any launch or compilation scripts so that all
> references would be resolved while running hosted mode or the GWT compiler.
> In the same way, you would refer to this JAR in your ant build.xml file for
> gwtc or hosted mode startup targets.
>
> You could also refer to the GWT module's source folder and classpath
> directly, as you did in your Eclipse configurations. This should also work
> in Ant by defining the appropriate <path> element. Something like the
> snippet below should do the trick:
>
> <path id="apple.class.path">
>     <fileset dir="../Apple/src/com/gawkat/gwt/apple/client">
>       <include name="**/*.java"/>
>     </fileset>
>   </path>
>
> <target name="gwtc" depends="javac" description="GWT compile to JavaScript">
>     <java failonerror="true" fork="true"
> classname="com.google.gwt.dev.Compiler">
>       <classpath>
>         <pathelement location="src"/>
>         <path refid="apple.class.path"/>
>         <pathelement location="${gwt.home}/${gwt.dev.jar}"/>
>       </classpath>
>       <jvmarg value="-Xmx256M"/>
>       <arg value="com.gawkat.gwt.Test"/>
>     </java>
>   </target>
>
> This would be in addition to other path elements you would need to define to
> build your project.
>
> Hope that helps,
> -Sumit Chandel
>
> On Wed, Mar 4, 2009 at 8:23 AM, branflake2267 <[email protected]>wrote:
>
>
>
> > How do I include the classpath for another module so ant will build?
>
> > - My main module com.gawkat.gwt.Test
> > - In Text.gwt.xml file I include "<inherits
> > name='com.gawkat.gwt.Apple'/>"
> > - I have added Apple projects classpath and src folder to Test Debug
> > Configurations classpath and hosted mode will build the projects.
>
> > So How can I get Ant to Compile it?
>
> > > Run As > Build.xml in com.gawkat.gwt.Test :
>
> > Buildfile: /home/branflake2267/workspace2/Test/build.xml
> > libs:
> > javac:
> > gwtc:
> >     [java] Loading module 'com.gawkat.gwt.Test'
> >     [java]    Loading inherited module 'com.gawkat.gwt.Apple'
> >     [java]       [ERROR] Unable to find 'com/gawkat/gwt/
> > Apple.gwt.xml' on your classpath; could be a typo, or maybe you forgot
> > to include a classpath entry for source?
> >     [java]    [ERROR] Line 15: Unexpected exception while processing
> > element 'inherits'
> >     [java] com.google.gwt.core.ext.UnableToCompleteException: (see
> > previous log entries)
> >    ....
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to