alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<project name="Build ActionScript sample" default="build-all" basedir=".">

	<target name="init">
		<property environment="env"/>
			
		<property name="mxml.file" value="HelloWorld.mxml"/>
		<property name="main.class" value="org/eclipse/swt/e4/examples/helloworld/SWTHelloWorld.java"/>
		<property name="projectdir" value="../.."/>
		<property file="../flex.properties"/>
	</target>
	
	<target name="build-all">
		<antcall target="build-as"/>
		<antcall target="build-swf"/>
	</target>
		
	<target name="build-as" depends="init">
		<mkdir dir="buildtmp"/>
		<delete>
			<fileset dir="buildtmp"/>
		</delete>
		<java jar="${projectdir}/../../eca-export/eca.jar" fork="true">
			<arg value="-bootclasspath"/>
			<arg value="buildtmp"/>
			<arg value="-sourcepath"/>
			<arg path="${source.path};${swt.source.path}"/>
			<arg value="-d"/>
			<arg value="buildtmp"/>
			<arg value="${projectdir}/src/${main.class}"/>
		</java>
	</target>
	
	<target name="build-swf" depends="init">
		<copy todir="buildtmp">
			<fileset dir="resources"/>
		</copy>		
		<exec 	
			executable="${env.FLEX_SDK}\\bin\\mxmlc.exe"
			dir="buildtmp">
			<arg line="-debug=false -use-network=true -strict=true ${mxml.file}"/>
		</exec>
		<copy todir="bin">
			<fileset dir="buildtmp" includes="*.swf"/>
		</copy>
	</target>
	
	<target name="clean">
		<delete dir="buildtmp"/>
	</target>
</project>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.