Create GWT-compile rule for Ant build.xml - gwt

I'm trying to make an Eclipse-compilable GWT project also compilable on the command line (via Ant).
Eclipse provides functionality to export a build.xml; this works fine for compiling the classes, but since GWT's special stuff is all provided via a plugin, these rules are not included.
Google provides a tool for creating build.xml files for new projects. I've incorporated the rules generated by this into the Eclipse-exported file.
Compiling (the part provided by Eclipse) is successful.
Here is the compile-things-to-javascript task:
<target name="gwtc" depends="build" description="GWT compile to JavaScript (production mode)">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="war/WEB-INF/classes"/>
<pathelement location="src"/>
<path refid="project.class.path"/>
<pathelement location="/Applications/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/validation-api-1.0.0.GA.jar" />
<pathelement location="/Applications/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/validation-api-1.0.0.GA-sources.jar" />
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<!--<arg line="-style PRETTY"/>-->
<arg line="-war"/>
<arg value="war"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="edu.calpoly.csc.scheduler"/>
</java>
</target>
The .gwt.xml file looks like so:
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='gwtview'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='edu.calpoly.csc.scheduler.view.client.GWTView'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<source path='view'/>
</module>
When trying to run the task, I get this error:
gwtc:
[java] Compiling module edu.calpoly.csc.scheduler
[java] Finding entry point classes
[java] [ERROR] Unable to find type 'edu.calpoly.csc.scheduler.view.client.GWTView'
[java] [ERROR] Hint: Previous compiler errors may have made this type unavailable
[java] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
Which seems strange to me, since the class is very much there:
[$]> ls war/WEB-INF/classes/edu/calpoly/csc/scheduler/view/client
GWTView$1.class GWTView$1MyHandler.class GreetingService.class
GWTView$1MyHandler$1.class GWTView.class GreetingServiceAsync.class
Halp?

Are you sure you have sources of your GWT app on classpath? GWT is compiling java sources to js, not *.class files.

Make sure that you have that library/jar and any other SOURCE needed available on the classpath you pass to the GWT Compiler, as it will need to be able to find the Java source inside GWT libs to be able to compile them, unlike the Javac compiler than can compile against libraries using just the provided .class files.
Here is my ant gwtc compile macro. (removed leading <to avoid formatting problems...)
macrodef name="gwtCompileApplication" >
<attribute name="app" />
<attribute name="extraArgs" default="" />
<attribute name="gwtcExtras" default="" />
<sequential>
<java classpathref="gwtCompile.classpath" classname="com.google.gwt.dev.Compiler" fork="true" failonerror="true">
<jvmarg value="-Xmx512M" />
<arg value="-strict" />
<!-- Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
<arg value="-logLevel" />
<arg value="DEBUG" />
-->
<!-- request detailed, non-obfuscated JS output
<arg value="-style" />
<arg value="DETAILED" />
-->
<arg value="-localWorkers" />
<arg value="4" />
<arg value="-war" />
<arg value="${war.dir}" />
<arg value="-deploy" />
<arg value="deploy" />
<!-- These two lines have been removed as otherwise it won't work on Mac OS X
<arg value="#{extraArgs}" />
<arg value="#{gwtcExtras}" />
-->
<!-- This can be used to see more details about warnings, but they will be converted to errors and build will fail
<arg value="-strict" />
-->
<arg value="-logLevel" />
<arg value="INFO" />
<arg value="#{app}" />
</java>
</sequential>
</macrodef>
This can be invoked from any target thus:
A target to compile a specific module of mine called 'Admin" where the file Admin.gwt.xml file is inside .ta.Admin. I have a debug and production build type and a .gwt.xml different for each one to speed up compiling for debug (fewer user agents and languages = fewer permutations)
target name="gwtcAdmin" depends="compile, buildtype" description="GWT Compile Admin" >
<gwtCompileApplication app="com.bcntouch.ta.Admin.${build_type}_Admin" extraArgs="${gwtcArgs}" gwtcExtras="${gwtcExtras}"/>
</target>
But the key part if the GWT compile class path I use. Here is the target where I setup my paths:
target name="gwtPath">
<path id="gwt.classpath">
<pathelement location="${gwt.sdk.dir}/gwt-user.jar" />
<pathelement location="${gwt.sdk.dir}/gwt-servlet.jar" />
</path>
<!-- For GWT compile we need a path with source AND the GWT Compiler classes -->
<path id="gwtCompile.classpath">
<path refid="source.classpath" />
<!-- This is put after source, so GWT Compiler it doesn't pick up out of date versions of old css and uibinder
files in classes generated by Eclipse/GWT Plugin -->
<path refid="classpath" />
<path refid="tool.classpath" />
</path>
</target>

Related

Running an Ant-builded project as web-application

I'm trying to run a "project.zip" I've downloaded from the official GWT site about RPC and Hibernate at http://www.gwtproject.org/articles/using_gwt_with_hibernate.html .
The guide suggests:
"you can use Ant to build the project, as well as start up hosted mode
to see the UI and our Hibernate instance setup in the embedded Jetty
server."
So I have imported it on Eclipse with New > Project menu-> Java Project from Existing Ant Buildfile wizard.
My final goal is to run it on Eclipse as web-application, but it gives me every types of errors and above all there's no run as-> web application but only as ->ant build ! And all the War directory is missing in Eclipse.
How can change this Ant build project.zip to a normal project GWT? I'm amazed how an official Google guide can give so many problems!
If you need it this is the build.xml :
<?xml version="1.0" encoding="utf-8" ?>
<project name="Guestbook" default="build" basedir=".">
<!-- Define gwt.home, gwt.dev.jar, appengine.sdk.home -->
<property file="build.properties"/>
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes"/>
<pathelement location="${gwt.home}/gwt-user.jar"/>
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
</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.home}/gwt-servlet.jar" />
<!-- Add any additional server libs that need to be copied -->
<copy todir="war/WEB-INF/lib" flatten="true">
<fileset dir="lib/">
<include name="**/*.jar"/>
</fileset>
</copy>
</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>
</target>
<!-- can add additional arguments like -logLevel INFO or -style PRETTY -->
<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"/>
<pathelement location="${gwt.home}/${gwt.dev.jar}"/>
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<arg value="com.google.musicstore.MusicStore"/>
</java>
</target>
<target name="hosted" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
<pathelement location="${gwt.home}/${gwt.dev.jar}"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg value="-startupUrl"/>
<arg value="MusicStore.html"/>
<arg value="com.google.musicstore.MusicStore"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
</java>
</target>
<target name="build" depends="gwtc" description="Build this project" />
<target name="clean" description="Cleans this project">
<delete dir="war/WEB-INF/classes" failonerror="false" />
<delete dir="war/musicstore" failonerror="false" />
</target>
</project>
run
ant
to build the project.
run
ant hosted
to run the project.
I'm confused by the concept of a normal GWT project ... I'm not sure to understand what it means. But if it means an eclipse-ready-GWT-project, you will probably be disappointed because as you noted yourself:
you can use Ant to build the project
It is an ant based project, not en eclipse project. You can call ant from eclipse, but there is no specic eclipse files (.project and .classpath) so that it can run with gwt eclipse plugin without configuring it yourself.

Getting gwt hibernate example code to work with eclipse

I am starting out with GWT and hibernate. I'm going through the tutorial at https://developers.google.com/web-toolkit/articles/using_gwt_with_hibernate.
I downloaded the sample code provided with the tutorial (http://google-web-toolkit.googlecode.com/files/gwt_hibernate_base.zip). This is a simple music store where you can add an account and records. I am able to run this and successfully add accounts and records to the database by doing the following commands:
(in the data directory) java -cp ../lib/hsqldb.jar org.hsqldb.Server
ant build hosted
Here is the build.xml file used to build this:
<?xml version="1.0" encoding="utf-8" ?>
<project name="Guestbook" default="build" basedir=".">
<!-- Define gwt.home, gwt.dev.jar, appengine.sdk.home -->
<property file="build.properties"/>
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes"/>
<pathelement location="${gwt.home}/gwt-user.jar"/>
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
</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.home}/gwt-servlet.jar" />
<!-- Add any additional server libs that need to be copied -->
<copy todir="war/WEB-INF/lib" flatten="true">
<fileset dir="lib/">
<include name="**/*.jar"/>
</fileset>
</copy>
</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>
</target>
<!-- can add additional arguments like -logLevel INFO or -style PRETTY -->
<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"/>
<pathelement location="${gwt.home}/${gwt.dev.jar}"/>
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<arg value="com.google.musicstore.MusicStore"/>
</java>
</target>
<target name="hosted" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
<pathelement location="${gwt.home}/${gwt.dev.jar}"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg value="-startupUrl"/>
<arg value="MusicStore.html"/>
<arg value="com.google.musicstore.MusicStore"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
</java>
</target>
<target name="build" depends="gwtc" description="Build this project" />
<target name="clean" description="Cleans this project">
<delete dir="war/WEB-INF/classes" failonerror="false" />
<delete dir="war/musicstore" failonerror="false" />
</target>
Now I would like to get this simple example working in eclipse. I created a project called MusicStore using the gwt eclipse plugin. I then copied over the tutorial files without changing them. I can't post an image but here is a link to my eclipse project structure:
http://oi50.tinypic.com/t6rn2w.jpg
Again, I start by running
(in the data directory) java -cp ../lib/hsqldb.jar org.hsqldb.Server
Then I try to run my project in eclipse but hibernate doesn't work. When I try to add an account in the UI it alerts "Failed to save account" and I get the error java.lang.NoClassDefFoundError: org/hibernate/Session.
Please let me know how I should go about getting the sample code working with eclipse. I think that many users new to hibernate will also want to do this.
Thanks!
Basically eclipse cannot find your hibernate libraries. That is because your build.xml is for building a war file. Eclipse doesn't read it so it doesn't have any of your build information in there.
A quick solution to this is to just go to the "Build Path" properties in Eclipse and make sure your /lib directory is included in the "Libraries" tab. Then eclipse will know where you are keeping your libraries.
A better solution would be to use something like Maven. Then the Maven Plugin for Eclipse will automatically look at the Maven build file and configure the Eclipse project so that it can detect where the libraries are held etc...

Folder with jars in project

When I work on small desktop projects I used to create lib folder in my project's root where I keep all project's jar dependencies. Then I use Configure Build Path -> Libraries -> Add JARs... to manually add all jars from this folder to buildpath/classpath. And because Add JARs... (unlike Add external JARs) uses relative paths, the project is portable, what is important for me.
The problem is that each time I add or remove a jar from my lib folder I need to manually add/remove this jar in project buildpath settings (and of course I often forget to do so).
Is there a way to just inform Eclipse that "This is a folder where I keep all of my jars. Please, add all the jars from there automatically to buildpath/classpath"? I tried to treat this folder as a class folder (Add class folder...) but it doesn't work that way :(.
P.S. I know about Maven and Eclipse-Maven integration but I want to keep my small project's simple (Maven integration is sometimes frustrating so I prefer to avoid it in these projects), so please don't suggest this in answer. Also as I mentioned, these are desktop projects, so there is no WEB-INF/lib folder in my project that is usually automatically handled by Java EE plugins.
you can try with a classpath container, take a look here for an example .
Take a look also at the Apache IvyDE classpath container .
However adding a new library to the classpath is simple and quick as :
Right click on it ---> Build Path ---> Add To Build Path
EDIT
This lightweight plugin should do exactly what you want !
I am not too sure, but can't you have wildcards in your classpath? That way you could just edit your .classpath file for that Eclipse project and use * within a particular folder... I have not tried, i'm in a rush but that's my idea... don't know if works
EDIT here is something that you could find useful:
How to use a wildcard in the classpath to add multiple jars?
Basically, just edit your .classpath file, which is where Eclipse stores the classpath settings for a project
I think the best is to use Gradle. This does not have the frustration of Maven with Eclipse. If you use STS it comes with Gradle pre-bundled.
See the link
So yeah I did this before:
Use Apache Ant and specify an ant configuration that suits your build path and eclipse should be able to use it with the use from existing ant build option.
Here is an example ant file you might have:
<?xml version="1.0"?>
<project name="Demo Project" basedir="." default="package">
<!-- ================================================================= -->
<!-- C O N F I G U R A T I O N -->
<!-- ================================================================= -->
<!--
Access the environment properties
-->
<property environment="env" />
<!--
TODO: Access the environment properties with a prefix of "env".
-->
<!--
Additional 3rd-party tools
-->
<property name="ant.home" value="${env.ANT_HOME}"/>
<property name="junit.home" value="${env.JUNIT_HOME}"/>
<property name="jmock.home" value="${env.JMOCK_HOME}"/>
<!--
Project folders
-->
<property name="project.home" value="${basedir}" />
<property name="bin.dir" value="${project.home}/bin" />
<property name="dist.dir" value="${project.home}/dist" />
<property name="dist.file" value="${dist.dir}/lab03.jar" />
<property name="col.file" value="${dist.dir}/lab03-col.jar" />
<property name="src.dir" value="${project.home}/src" />
<property name="lib.dir" value="${project.home}/lib" />
<!--
TODO: Define the classpath to be used during compilation. This should
consist of all of the JAR files in the ${lib.dir} folder.
-->
<path id="project.class.path">
<path location="${dist.file}" />
<path location="${bin.dir}" />
<fileset dir="${junit.home}">
<include name="junit-4.7.jar"/>
</fileset>
<fileset dir="${jmock.home}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${ant.home}/lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<!--
TODO: Define the classpath to be used during execution. This should
consist of all of the JAR files in the ${lib.dir} folder as well as
${dist.file}.
-->
<path id="execution.class.path">
<path location="${bin.dir}" />
<path location="${bin.dir}/MyPath1/MyPath" />
<path location="${bin.dir}/MyPath1/MyPath/impl" />
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ================================================================= -->
<!-- C L E A N -->
<!-- ================================================================= -->
<target name="clean"
description="Clean all build products">
<delete dir="${bin.dir}" />
<delete dir="${dist.dir}" />
</target>
<!-- ================================================================= -->
<!-- C O M P I L E -->
<!-- ================================================================= -->
<target name="compile"
depends="clean,init"
description="Compiles the application code">
<!--
TODO: Add the javac task. It should compile everything in ${src.dir}
and place the output in ${bin.dir}. The classpath should refer to the
"project.class.path" defined above.
-->
<javac srcdir="${src.dir}"
destdir="${bin.dir}">
<classpath refid="project.class.path" />
</javac>
</target>
<!-- ================================================================= -->
<!-- E N V -->
<!-- ================================================================= -->
<target name="env"
description="Displays information about the build">
<echo message="src.dir..........${src.dir}" />
<echo message="lib.dir..........${lib.dir}" />
<echo message="bin.dir..........${bin.dir}" />
<echo message="dist.dir.........${dist.dir}" />
<echo message="dist.file........${dist.file}" />
<echo message="col.file.........${col.file}" />
<echo message="reports.dir......${reports.dir}" />
</target>
<!-- ================================================================= -->
<!-- I N I T -->
<!-- ================================================================= -->
<target name="init"
depends="env"
description="Initializes the environment">
<mkdir dir="${bin.dir}" />
<mkdir dir="${dist.dir}" />
</target>
<!-- ================================================================= -->
<!-- P A C K A G E -->
<!-- ================================================================= -->
<target name="package"
depends="compile"
description="Creates the application distribution file">
<!--
TODO: Create a JAR file. The target JAR should be ${dist.file} and it
should contain everything from ${bin.dir}.
-->
<jar destfile="${dist.file}"
basedir="${bin.dir}"
excludes="**/*Test*.class"
/>
</target>
<!-- ================================================================= -->
<!-- P A C K A G E - C O L -->
<!-- ================================================================= -->
<target name="package-col"
depends="compile"
description="Creates the file to be submitted to COL.">
<jar destfile="${col.file}">
<fileset dir="${project.home}"
includes="src/**/*.java" />
<fileset dir="${project.home}"
includes="lib/**/*.jar" />
<fileset dir="${project.home}"
includes="build.xml" />
</jar>
</target>
<!-- ================================================================= -->
<!-- R U N -->
<!-- ================================================================= -->
<target name="run"
depends="package"
description="Executes the test file">
<java classname="MyPath1.MyPath.FileScanner">
<classpath refid="execution.class.path" />
<arg value="file:///" />
</java>
</target>
</project>
AND Here is a link with someone with a similair problem using ant to solve his classpath problems.
Ant is portable so it can actually be set up anywhere and you can also use global variables to keep all systems consistent or just use relative paths. And there is also an eclipse ant plugin
just try including
<classpathentry kind="lib" path="lib/spring/4.2.1" including="*.jar"/>

GWT compile POJO

I'm trying to use just the Java to Javascript compiler of the GWT from Ant.
Can I use the GWT compiler without extending any Google classes such as com.google.gwt.core.Core or similar. If so how? I'm currently using the setup below on GWT 2.4.0.
I'm calling the ant task:
build.xml
<target name="gwtc" description="GWT compile to JavaScript (production mode)">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<arg line="-war"/>
<arg value="war"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="foo.Test1"/>
</java>
</target>
foo/Test.java
package foo;
public class Test1 {
public String field1;
public String field2;
public int field3;
}
foot/Test1.gwt.xml
<module rename-to="hello">
<source path="foo.Test1"/>
<!--entry-point class="foo.Test1"/-->
</module>
And output:
gwtc:
[java] Compiling module foo.Test1
[java] [ERROR] Unable to find type 'java.lang.Object'
[java] [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
The error indicates that you need to inherit 'com.google.gwt.core.Core' in your gwt.xml file and it is not saying that your class should extend/implement it. Give this a try:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE
module
PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.3.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="hello">
<inherits name="com.google.gwt.core.Core" />
<source path="foo" />
</module>
Or is it that you don't want your module to inherit it?

GWT hosted mode not working with Spring + Eclipse + GWT Eclipse plugin

I've been trying to get GWT working with Spring for a while now. Is there anyone who is using official Eclipse GWT plugin with Spring, and who has managed to get hosted mode working with that combination?
I'm using GWTController to initialize GWT through dispatcher-servlet.xml. Since my WEB-INF is not in war, but in WebContent folder, I use "-war WebContent" switch when compiling Java code to .js.
As for hosted mode... if I try to run it through IDE (Run as Web Application) I get "Launch failed - Could not find any host pages in project MyProject." I tried running it with Ant task which goes something like this:
<condition property="XstartOnFirstThread" value="-XstartOnFirstThread">
<os family="mac"/>
</condition>
<condition property="XstartOnFirstThread" value="">
<not><os family="mac"/></not>
</condition>
<target name="hosted" depends="" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
<classpath>
<pathelement location="src" />
<path refid="my-client-classpath" />
</classpath>
<jvmarg value="-Xmx256M" />
<jvmarg line="${XstartOnFirstThread}" />
<arg value="-startupUrl" />
<arg value="MyPage.html" />
<arg value="my.gwt.client.Whatever" />
</java>
</target>
This results in hosted mode starting, but I get 404 instead of my web page...
EDIT: When I go to hosted mode, I see folder with compiled Javascript code but nothing else. So my question is basically has someone got a good tutorial or a setup he can share? There is a lot of half-baked info on the Net, but I wasn't able to make any of it work.
EDIT 2: Here's my .gwt.xml file, it's pretty basic:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.1/distro-source/core/src/gwt-module.dtd">
<module rename-to='whatever'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='my.gwt.client.Whatever' />
<!-- Lokalizacije -->
<extend-property name="locale" values="hr" />
</module>
We used this tutorial to get it working for us, hope it helps