首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >GWT1.7从ant构建文件编译

GWT1.7从ant构建文件编译
EN

Stack Overflow用户
提问于 2009-11-03 22:48:33
回答 1查看 6.3K关注 0票数 1

我需要从我的ant build file....anyone编译我的GWT1.7项目,知道怎么做吗?

在GWT1.5中,我可以通过ant文件中的以下代码做到这一点:

代码语言:javascript
运行
复制
<target name="compile">
   <exec executable="${root.dir}/HelloWorld-compile.cmd"  failonerror="true"/>

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2009-11-04 05:34:54

下面是我用来在托管模式下运行和使用gwt 1.7.1进行编译的一些ant目标。

代码语言:javascript
运行
复制
<property name="src.dir" value="src/main/java" />
<property name="build.dir" value="war" />

<path id="compile.classpath">
        <fileset dir="${build.dir}/WEB-INF/lib">
            <include name="**/*.jar" />
            <include name="**/*.xml" />
        </fileset>
    </path>

<target name="hosted" depends="javac" description="Starts gwt project in a standalone hosted browser and runs embedded jetty on port 8888">
            <java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
                <classpath>
                    <pathelement location="${src.dir}" />
                    <path refid="compile.classpath" />
                </classpath>
                <jvmarg value="-Xms256M" />
                <jvmarg value="-Xmx256M" />
                <arg value="-startupUrl" />
                <arg value="index.html" />
                <arg value="com.gwt-example.ModuleName" />
            </java>
        </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.dir}" />
                    <path refid="compile.classpath" />
                </classpath>
                <jvmarg value="-Xmx256M" />
                <arg value="com.gwt-example.ModuleName" />
            </java>
        </target>
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1667796

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档