Yea, I want to reuse the submodules as most as possible, but I don't want to compile them into jars every time I make a change. I am trying to figure out how to configure the compiler to use the other projects as if it where one big project.
Thanks for your help. Brandon On Mar 26, 2:00 pm, Sumit Chandel <[email protected]> wrote: > Hi Brandon, > > I'm not clear why you would need to compile the sub modules independently > from the main module. The GWT compiler performs a monolithic compilation for > each module it compiles, therefore the submodules would be completely > independent from the main module if they were compiled separately. It seems > like if you want to reuse those submodules, the best way would be to > reference them from your main project (linking source in Eclipse, for > example), and adding the submodules to your main GWT compilation target as > shown in the ant snippet. > > If you have server-side classes that you want to compile separately and > include in the main project, you should probably set up a build target that > will javac those classes and copy them over to the main GWT project > directory. The gwtc target would then be dependent on that step before being > able to perform its own GWT compilation. > > Putting into context of your next goals, 3. would be solved by what was > described in the last paragraph. 1. and 2. might not need to be explicit > goals since compiling separately probably won't be of much value for what I > think you're trying to do. Although I may have misundertstood the purposes > for goals 1 & 2. > > Hope that helps, > -Sumit Chandel > > On Sun, Mar 22, 2009 at 4:01 PM, branflake2267 <[email protected]>wrote: > > > > > 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/Naviga...main > >project > > >http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/gwt-Sy... > > - 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 -~----------~----~----~----~------~----~------~--~---
