1. 安装ant,然后复制FLEX_HOME/sdks/4.0.0/ant/lib下面的flexTasks.jar到ANT_HOME/lib
2. build.properties
# change this to your Flex SDK directory path
FLEX_HOME=D:/Adobe/Adobe Flash Builder 4 Plug-in/sdks/4.0.0
# this points to your project's src directory
# {$basedir} is a default variable that can be used in any Ant
script
# and it points to the project's root folder [ flex_ant_pt1_Tasks ]
in this case
SRC_DIR =${basedir}/src
# points to the project's libs directory
LIBS_DIR =${basedir}/libs
# this is the folder we want to publish the swf to
DEPLOY_DIR = ${basedir}/DEPLOY
3. build.xml
<project name="Flex Ant Tasks Build Script" default="compile flex project">
<!-- load previously defined configuration properties file -->
<property file="build.properties" />
<!-- points to our flexTasks.jar we copied to the libs folder to distribute with the project -->
<taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasks.jar"/>
<!-- delete and create the DEPLOY dir again -->
<target name="init">
<delete dir="${DEPLOY_DIR}" />
<mkdir dir="${DEPLOY_DIR}" />
</target>
<!-- Build and output the Main.swf-->
<target name="compile flex project" depends="init">
<mxmlc file="${SRC_DIR}/Main.mxml" output="${DEPLOY_DIR}/Main.swf">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<compiler.debug>false</compiler.debug>
</mxmlc>
</target>
</project>
4. 在Flex Builder中创建一个Flex项目,新建一个Main.mxml
5.cmd进入到刚才创建的Flex项目目录,执行ant命令。注意:build.properties,build.xml放在刚才创建的Flex项目根目录下
- 大小: 43.2 KB
分享到:
相关推荐
博文链接:https://nstar.iteye.com/blog/129653
还在为找不到jar文件烦心吗,不用了到我空间来有你想要的,持续更新。。。 maven-ant-tasks.jar
The Mavent Ant Tasks allow several of Maven's artifact handling features to be used from within an Ant build. These include: Dependency management - including transitive dependencies, scope ...
官方版本,亲测可用
标签:ant-tasks-2.1.3.jar,ant,tasks,2.1.3,jar包下载,依赖包
maven包:maven-ant-tasks-2.1.3.jar 手动下载配置,解决国外源下载速度慢的问题
标签:ant-tasks-2.1.3.jar.zip,ant,tasks,2.1.3,jar.zip包下载,依赖包
标签:ant-tasks-2.1.4.jar,ant,tasks,2.1.4,jar包下载,依赖包
ANT task 参考资料,手头必备资料。因为ant只有html在线文档,pdf易于离线查看。
Android SDK 26以后ant编译错误解决办法(错误信息:taskdef A class needed by class com.android.ant.GetUiTargetTask) https://blog.csdn.net/xlyrh/article/details/107766878
官方版本,亲测可用
标签:ant-tasks-2.4.1.FINAL.jar.zip,ant,tasks,2.4.1.FINAL,jar.zip包下载,依赖包
The Mavent Ant Tasks allow several of Maven's artifact handling features to be used from within an Ant build. These include: Dependency management - including transitive dependencies, scope ...
The .NET antlib in preparation will replace the .NET optional tasks which ship in Ant. Support for the version control system Subversion will be only provided as an antlib to be released shortly. ...
标签:ant-tasks-2.1.4-javadoc.jar,ant,tasks,2.1.4,javadoc,jar包下载,依赖包
标签:ant-tasks-2.1.4-sources.jar,ant,tasks,2.1.4,sources,jar包下载,依赖包
Orangevolt Ant Tasks(ROXES Ant Tasks 的继任者)为著名的 Apache Jakarta Ant (http://ant.apache.org/) 提供了 17 个自定义任务,针对 *nix/windows 和 macosx 的 java 应用程序部署。 它是根据 LGPL 许可的
maven-ant-tasks:Apache Maven ant任务的镜像