<?xml version="1.0" encoding="UTF-8"?>
<!-- WARNING: Any manual modifications to this file may be automatically overriden -->
<!-- Created with GWT4NB 2.0.1 -->
<project name="Gwthello-gwt" default="-post-compile" basedir="..">
    <description>Generates Javascript for Gwthello.</description>
    <property file="./nbproject/gwt.properties"/>
    
    <target name="-post-compile">
        <!-- You can override this property in the 'gwt.properties' file -->
        <property name="gwt.compiler.output.style" value="OBFUSCATED"/>
        <property name="gwt.compiler.logLevel" value="WARN"/>
        
        <java classpath="${javac.classpath}:${src.dir}" failonerror="true"
              classname="com.google.gwt.dev.GWTCompiler" fork="true">
            <arg value="-out"/>
            <arg path="${build.web.dir}/"/>
            <arg value="-style"/>
            <arg value="${gwt.compiler.output.style}"/>
            <arg value="-logLevel"/>
            <arg value="${gwt.compiler.logLevel}"/>
            <arg value="${gwt.module}"/>
        </java>
        
        <property name="gwt.output.dir" value="${gwt.module}"/>
        
        <move todir="${build.web.dir}/${gwt.output.dir}">
            <fileset dir="${build.web.dir}/${gwt.module}"/>
        </move>
    </target>
    
    <target name="debug" description="Debug project in IDE." depends="init,compile,compile-jsps,-do-compile-single-jsp,dist" if="netbeans.home">
        <nbdeploy debugmode="true" clientUrlPart="${client.urlPart}"/>
        <antcall target="connect-debugger"/>
        <antcall target="debug-connect-gwt-shell"/>
    </target>
    
    <target name="debug-connect-gwt-shell" if="netbeans.home" depends="init">
        <nbjpdastart transport="dt_socket" addressproperty="jpda.address.gwt" name="com.google.gwt.dev.GWTShell" stopclassname="">
            <classpath>
                <path path="${javac.classpath}:${src.dir}:${build.classes.dir}"/>
            </classpath>
        </nbjpdastart>
        <property name="gwtshell.jvmargs.base" value="-Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,address=${jpda.address.gwt}"/>
        
        <condition property="gwtshell.jvmargs" value="${gwtshell.jvmargs.base} -XstartOnFirstThread"
                   else="${gwtshell.jvmargs.base}">
            <os family="mac"/>
        </condition>
        
        <java fork="true" classname="com.google.gwt.dev.GWTShell" failonerror="true">
            <jvmarg line="${gwtshell.jvmargs}"/>
            <classpath>
                <path path="${src.dir}:${javac.classpath}:${build.classes.dir}"/>
            </classpath>
            <syspropertyset>
                <propertyref prefix="run-sys-prop."/>
                <mapper type="glob" from="run-sys-prop.*" to="*"/>
            </syspropertyset>
            <arg value="-noserver"/>
            <arg value="${client.url}"/>
        </java>
    </target>
    
    <target name="debug-connect-gwt-shell-hosted" if="netbeans.home" depends="init">
        <nbjpdastart transport="dt_socket" addressproperty="jpda.address.gwt" name="com.google.gwt.dev.GWTShell" stopclassname="">
            <classpath>
                <path path="${javac.classpath}:${src.dir}"/>
            </classpath>
        </nbjpdastart>
        <property name="client.url" value="${gwt.module}"/>
        <!-- You can override this property in the 'gwt.properties' file -->
        <property name="gwt.shell.output.style" value="OBFUSCATED"/>
        <property name="gwt.shell.logLevel" value="WARN"/>
        <property name="gwtshell.jvmargs.base" value="-Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,address=${jpda.address.gwt}"/>
        <condition property="gwtshell.jvmargs" value="${gwtshell.jvmargs.base} -XstartOnFirstThread"
                   else="${gwtshell.jvmargs.base}">
            <os family="mac"/>
        </condition>
        
        <java fork="true" classname="com.google.gwt.dev.GWTShell">
            <jvmarg line="${gwtshell.jvmargs}" />
            <classpath>
                <path path="${src.dir}:${javac.classpath}"/>
            </classpath>
            <syspropertyset>
                <propertyref prefix="run-sys-prop."/>
                <mapper type="glob" from="run-sys-prop.*" to="*"/>
            </syspropertyset>
            <arg value="-out"/>
            <arg path="${build.web.dir}/"/>
            <arg value="-style"/>
            <arg value="${gwt.shell.output.style}"/>
            <arg value="-logLevel"/>
            <arg value="${gwt.shell.logLevel}"/>
            <arg value="${client.url}"/>
        </java>
    </target>
    
</project>
