1
我希望能有這樣做幾乎同樣的事情,不同的目標,像這樣:如何宏觀 - 螞蟻目標?
ant build <- this would be a normal (default) build
ant safari <- building the safari target.
的目標是這樣的:
<target name="build" 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"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg value="${lhs.target}"/>
</java>
</target>
<target name="safari" depends="javac" description="GWT compile to Safari/JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg value="${lhs.safari.target}"/>
</java>
</target>
(沒關係,首先想到的是打擊:扔出去螞蟻!這不是一個選項。)我嘗試使用macrodef,但得到了一個奇怪的錯誤消息(即使消息並不意味着它,它認爲它必須做一個目標順序)。我不想寫如下的cmdline:ant -Dwhatever=nevermind
。有任何想法嗎?
的*奇怪的錯誤消息*會有所幫助,以及你開槍'macrodef'。 – 2010-03-22 12:43:10