- Create a new Java project in Eclipse
- Create Maven2 pom.xml with all dependencies you may need
- Ant build.xml file:
<target name="war" depends="clean">
<echo>Maven Executable: ${MAVEN_EXEC}echo>
<exec taskname="mvn war" dir="${basedir}"
executable="${MAVEN_EXEC}">
<arg line="clean compile war:war -Dtarget=${TARGET}" />
exec>
<delete file=".\\target\\csd.war" />
target>
name="gwt_shell" depends="war"> <echo>GWT: starting hosted (dev)echo>
<java taskname="GWT hosted" classpathref="class_path"
classname="com.google.gwt.dev.GWTShell" fork="true"
maxmemory="512m">
<jvmarg line="-verbose ${JVM_ARG_START}" />
<arg line="-out www com.taktico.Main/Main.html" />
java>
target>
<target name="gwt_compile_to_js" depends="war">
<java taskname="GWT compile" classpathref="class_path"
classname="com.google.gwt.dev.GWTCompiler" fork="true"
maxmemory="512m">
<jvmarg line="-verbose ${JVM_ARG_START}" />
<arg line="-logLevel WARN -out www com.taktico.Main" />
java>
target>
- Properties file in src/main/resources (uki.properties)
DEPLOY_DIR = /usr/local/tomcat/webapps/csd/
GWT_HOME=/opt/gwt/gwt-mac-1.5.1/
JVM_ARG_START = -XstartOnFirstThread
MAVEN_EXEC=/opt/maven/apache-maven-2.0.9/bin/mvn
- Add src/com/taktico/public/Main.html
- Add src/com/taktico/Main.gwt.xml
No comments:
Post a Comment