嗨,我是 Haxe 的新手,正在尝试构建将 Haxe 文件执行到 js 文件的 ANT 脚本。Bellow 是我的 build.xml 文件,如果我遗漏了什么,请纠正我,错误说它找不到 Haxe 类“HelloWorld”。HelloWorld.hx 位于我已包含在“Sourcefiles”中的 aha/ 文件夹中
<?xml version="1.0" ?>
<project name="AHA" default="main" basedir=".">
<description>
Simple example build file
</description>
<property name="buildDir" value="./buildFiles"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="./tools/ant/ant-contrib-0.3.jar" />
</classpath>
</taskdef>
<target name="clean" description="Remove all generated files.">
<delete dir="${buildDir}/" />
</target>
<target name="main" depends="clean">
<!-- <property name="debug.target.app" value="app.js" /> -->
<mkdir dir="${buildDir}" />
<outofdate>
<sourcefiles>
<fileset dir="./aha/">
<include name="**/*.hx" />
</fileset>
</sourcefiles>
<targetfiles path="${buildDir}/*.js" />
<sequential>
<exec failonerror="true" executable="haxe">
<!-- arg line="-lib polygonal-core -lib createjs" /-->
<arg value="-js" />
<arg file="${buildDir}" />
<arg line="HelloWorld" />
</exec>
</sequential>
</outofdate>
</target>
</project>
当我运行 ant 命令行时,我收到错误消息
C:\Users\vishwanath.kolkar\Desktop\ahaproject>ant
Buildfile: C:\Users\vishwanath.kolkar\Desktop\ahaproject\build.xml
clean:
[delete] Deleting directory C:\Users\vishwanath.kolkar\Desktop\ahaproject\bui
ldFiles
main:
[mkdir] Created dir: C:\Users\vishwanath.kolkar\Desktop\ahaproject\buildFile
s
[exec] Class not found : HelloWorld
BUILD FAILED
C:\Users\vishwanath.kolkar\Desktop\ahaproject\build.xml:30: exec returned: 1
Total time: 0 seconds