I might as well document this for myself so I don't forget...

To use the incubator in GWT 1.7 you'll need to do the steps above, and add
something like this to your build.xml file:

<fileset dir="${gwt.sdk}" includes="gwt-inc*.jar"/>

The build.xml is only created if you used webAppCreator to create the
project, and as far as I know that's needed if you want GWT to output files
like the old version... (I'm using GWT/PHP on my wamp localhost server, so I
need the files.)

Here's an example of my build.xml  (Note: I never use hosted mode, I just
copy over files to a gwt folder on localhost).

<?xml version="1.0" encoding="utf-8" ?>
<project name="RobotSite" default="build" basedir=".">
  <!-- Configure path to GWT SDK -->
  <property name="gwt.sdk" location="C:/wamp/www/gwt/gwt17" />

  <path id="project.class.path">
    <pathelement location="war/WEB-INF/classes"/>
    <pathelement location="${gwt.sdk}/gwt-user.jar"/>
    <fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
    <!-- Add any additional non-server libs (such as JUnit) -->
    <fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
    <fileset dir="${gwt.sdk}" includes="gwt-incu*.jar"/>
  </path>

  <target name="libs" description="Copy libs to WEB-INF/lib">
    <mkdir dir="war/WEB-INF/lib" />
    <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
    <!-- Add any additional server libs that need to be copied -->
  </target>

  <target name="javac" depends="libs" description="Compile java source">
    <mkdir dir="war/WEB-INF/classes"/>
    <javac srcdir="src" includes="**" encoding="utf-8"
        destdir="war/WEB-INF/classes"
        source="1.5" target="1.5" nowarn="true"
        debug="true" debuglevel="lines,vars,source">
      <classpath refid="project.class.path"/>
    </javac>
    <copy todir="war/WEB-INF/classes">
      <fileset dir="src" excludes="**/*.java"/>
    </copy>
  </target>

  <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="project.class.path"/>
      </classpath>
      <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
      <jvmarg value="-Xmx256M"/>
      <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->

      <arg value="com.MadeByRobots.client.RobotSite"/>
    </java>
  </target>

  <target name="build" depends="gwtc" description="Copies GWT generated
files to www" >
    <copy todir="../../../robotsite/gwt">
      <fileset dir="war/robotsite" />
    </copy>
  </target>

</project>


With this configuration "ant build" from the command line will compile and
copy over the gwt files to my server folder.

Of course, you'll need to have to have ant installed and in the classpath:
http://techpitcher.com/installing-apache-ant-in-windows.html
<http://techpitcher.com/installing-apache-ant-in-windows.html>




On Mon, Dec 15, 2008 at 4:06 PM, Mark Rieck <uprightneti...@gmail.com>wrote:

> Wow, I don't know how I didn't see that. I guess it's because I made two
> projects because I was using old incubator code before etc, and I was
> looking at the wrong file except when I got so frustrated I had to post to
> Google Groups...
>
> Sorry to waste everyone's time.  Thanks.
>
>
>
> On Mon, Dec 15, 2008 at 12:47 PM, Isaac Truett <itru...@gmail.com> wrote:
>
>>
>> Did you mean com.google.gwt.libideas.LibIdeas?
>>
>> On Mon, Dec 15, 2008 at 3:33 PM, uprightnetizen
>> <uprightneti...@gmail.com> wrote:
>> >
>> > I'm trying to use the FastTree in my project in Eclipse.
>> >
>> > I have this in my module gwt.xml:
>> >      <inherits name='com.google.gwt.widgetideas.WidgetIdeas' />
>> >      <inherits name='com.google.gwt.widgetideas.LibIdeas' />
>> >
>> > I went to Project Properties -> Java Build Path, then added the
>> > gwt-incubator_1-4_final.jar
>> >
>> > I also changed the text in the shell and compile.cmd to have ;path-to-
>> > incubator-jar after the other jars.
>> >
>> > Is there anything else I have to do to get the incubator widgets to
>> > work?
>> >
>> > >
>> >
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to