Hi,
I don't know if this will help but here are our ant tasks for Netbeans
to support GWT in our environment
Hope this helps,
Nigel.
<target name="-gwt-edit-development" unless="GWT-PRODUCTION">
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_DEVELOPMENT_START.*$"/>
<substitution expression="<!-- #GWT_DEVELOPMENT_START--
>"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_DEVELOPMENT_END.*$"/>
<substitution expression="<!-- #GWT_DEVELOPMENT_END--
>"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_PRODUCTION_START.*$"/>
<substitution expression="<!-- #GWT_PRODUCTION_START--
><!--"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_PRODUCTION_END.*$"/>
<substitution expression="--><!--
#GWT_PRODUCTION_END-->"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
</target>
<target name="-gwt-edit-production" if="GWT-PRODUCTION">
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_DEVELOPMENT_START.*$"/>
<substitution expression="<!-- #GWT_DEVELOPMENT_START--
><!--"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_DEVELOPMENT_END.*$"/>
<substitution expression="--><!--
#GWT_DEVELOPMENT_END-->"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_PRODUCTION_START.*$"/>
<substitution expression="<!-- #GWT_PRODUCTION_START--
>"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
<replaceregexp byline="true" >
<regexp pattern="^.*#GWT_PRODUCTION_END.*$"/>
<substitution expression="<!-- #GWT_PRODUCTION_END--
>"/>
<fileset dir="${src.dir}">
<include name="com/google/gwt/log/Log.gwt.xml"/>
</fileset>
</replaceregexp>
</target>
<target name="-gwt-compile-copy-to-cvs" if="GWT-PRODUCTION">
<!-- copy to CVS eg. /home/linda/src/ST/webapps/st -->
<copy todir="${webapps.src.dir}/${gwt.main.package}" >
<fileset dir="${gwt.root.dir}/${gwt.main.package}">
<include name="**/*"/>
<exclude name="gwt.js"/>
<exclude name="*.cache.js"/>
</fileset>
</copy>
<mkdir dir="${webapps.src.dir}/WEB-INF/gwt"/>
<copy
file="${src.dir}/${temp.gwt.main.package}.gwt.xml"
tofile="${webapps.src.dir}/WEB-INF/gwt/$
{temp.gwt.main.package}.gwt.xml"
/>
</target>
<target name="-gwt-compile-files" depends="build,-gwt-init,-gwt-
edit-development,-gwt-edit-production">
<condition property="_gwt.dir.found">
<available file="${gwt.dir}" type="dir"/>
</condition>
<fail unless="_gwt.dir.found">You must set "gwt.dir" to point
to the install directory of GWT</fail>
<copy todir="${gwt.root.dir}/">
<fileset dir="${webapps.src.dir}/"/>
</copy>
<property name="gwt.log.level" value="DEBUG"/>
<echo>COMPILE: ${gwt.main.package}</echo>
<delete dir="${gwt.root.dir}/${gwt.main.package}"/>
<java classname="com.google.gwt.dev.GWTCompiler" fork="true">
<jvmarg value="-Xmx256m"/>
<arg value="-out"/>
<arg value="${gwt.root.dir}"/>
<arg value="-style" />
<arg value="${gwt.compile.style}" />
<arg value="-gen" />
<arg value="${gwt.base.dir}/src" />
<arg value="-logLevel"/>
<arg value="INFO"/>
<arg value="${gwt.main.package}"/>
<classpath>
<pathelement path="${src.dir}/" />
<fileset dir="${gwt.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${build.dir}"/>
</classpath>
</java>
<!-- NEEDED FOR GWT 1.4RC1 ONLY -->
<replaceregexp
match="\s([a-zA-Z_0-9\$]+)\s*=\s*\$doc\.createElement\
('iframe'\);"
replace=" \1=\\\$doc.createElement('iframe');
\1.src='javascript:\\\\'<html></html>\\\\'';" flags="g">
<fileset dir="${gwt.root.dir}/${gwt.main.package}">
<include name="*.cache.html"/>
</fileset>
</replaceregexp>
<!--
Copy the required files.
exclude:-
*.cache.js
-->
<delete failonerror="false" >
<fileset dir="${root.dir}/${gwt.main.package}">
<include name="**/*"/>
<exclude name="CVS"/>
</fileset>
</delete>
<!-- copy to the current webapps directory eg. /home/linda/
projects/ST/webapps/ROOT -->
<copy todir="${root.dir}/${gwt.main.package}">
<fileset dir="${gwt.root.dir}/${gwt.main.package}">
<include name="**/*"/>
<exclude name="gwt.js"/>
<exclude name="*.cache.js"/>
</fileset>
</copy>
<delete failonerror="false" >
<fileset dir="${webapps.src.dir}/${gwt.main.package}">
<include name="**/*"/>
<exclude name="CVS"/>
</fileset>
</delete>
<!--
GWT 1.4 can only handle one module so we need to copy the
definition to
the WEB-INF directory so that we can automatically pick the
best
matching hybrid
-->
<echo file="${project.dir}/tmp/tempfile.txt">$
{gwt.main.package}</echo>
<replace file="${project.dir}/tmp/tempfile.txt" token="."
value="/"/>
<loadfile property="temp.gwt.main.package" srcFile="$
{project.dir}/tmp/tempfile.txt"/>
<mkdir dir="${gwt.root.dir}/WEB-INF/gwt"/>
<copy
file="${src.dir}/${temp.gwt.main.package}.gwt.xml"
tofile="${gwt.root.dir}/WEB-INF/gwt/$
{temp.gwt.main.package}.gwt.xml"
/>
<mkdir dir="${root.dir}/WEB-INF/gwt"/>
<copy
file="${src.dir}/${temp.gwt.main.package}.gwt.xml"
tofile="${root.dir}/WEB-INF/gwt/$
{temp.gwt.main.package}.gwt.xml"
/>
</target>
<!--
Compile a GWT module and copy the result to the three locations
required.
1) The GWT hosted location ( no choice about the location here)
2) Our current web apps root directory
3) the CVS version of the web application
We then need to copy the definition of the modules to the WEB-INF
directory so that HTMLPage can make an
informed guess which modules to include.
-->
<target name="gwt-compile" depends="-gwt-compile-files,-gwt-
compile-copy-to-cvs">
</target>
<target name="gwt-debug" depends="-gwt-init,-make-run-libs">
<nbjpdastart name="Debug GWT" addressproperty="jpda.address"
transport="dt_socket">
<classpath>
<pathelement path="${root.dir}/" />
<fileset dir="${gwt.dir}">
<include name="**/*.jar" />
</fileset>
</classpath>
<sourcepath path="${src.dir}" />
</nbjpdastart>
<mkdir dir="${gwt.root.dir}/WEB-INF"/>
<!--copy file="${root.dir}/WEB-INF/web.xml" todir="$
{gwt.root.dir}/WEB-INF/"/-->
<copy failonerror="false" file="${root.dir}/WEB-INF/
startup.xml" todir="${gwt.root.dir}/WEB-INF/"/>
<property name="JDK.HOME" value="${jdk.home}"/>
<property name="JAVA" value="${JDK.HOME}/bin/java"/>
<java classname="com.google.gwt.dev.GWTShell" fork="true"
dir="${gwt.base.dir}" jvm="${JAVA}" newenvironment="true">
<!--jvmarg value="-XstartOnFirstThread"/-->
<jvmarg value="-Xdebug"/>
<jvmarg value="-ea"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=$
{jpda.address}"/>
<jvmarg value="-Xmx256M"/>
<classpath>
<fileset dir="${gwt.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${src.dir}/" />
<pathelement path="${build.dir}"/>
<pathelement path="${app.libs}"/>
</classpath>
<arg line="-noserver ${gwt.server}/${gwt.main.html}"/>
</java>
</target>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---