<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lejnieks &#187; Ant</title>
	<atom:link href="http://www.lejnieks.com/tag/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lejnieks.com</link>
	<description></description>
	<lastBuildDate>Fri, 29 Jan 2010 19:22:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Compile ASDocs with ANT</title>
		<link>http://www.lejnieks.com/2009/01/10/compile-asdocs-with-ant/</link>
		<comments>http://www.lejnieks.com/2009/01/10/compile-asdocs-with-ant/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 05:24:07 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Ant]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ASDocs]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=62</guid>
		<description><![CDATA[Continuing on with ANT &#8211; Flex compilation, this sample script below will help you output ASDocs for your projects deliverable. Ant Script &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;project name=&#34;ASDocsTest&#34; default=&#34;compile&#34; basedir=&#34;.&#34;&#62; &#160; &#60;!-- import our build properties file --&#62; &#60;property file=&#34;./build.properties&#34; /&#62; &#160; &#160; &#60;!-- Flex Ant Tasks used to perform compc and mxml compiling more info [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on with ANT &#8211; Flex compilation, this sample script below will help you output ASDocs for your projects deliverable.</p>
<p><span id="more-62"></span></p>
<p><strong>Ant Script</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ASDocsTest&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;compile&quot;</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	import our build properties file</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;./build.properties&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	Flex Ant Tasks used to perform compc and mxml compiling more info at http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;flexTasks.tasks&quot;</span> <span style="color: #000066;">classpath</span>=<span style="color: #ff0000;">&quot;${flexTasks.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	Execute the ASDoc Compile</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;compile&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;generateASDocs&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;series of tasks to create docs&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	DELETE the existing output folder and files and then re-generate the output folder</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;cleanASDocsDir&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;DELETE the existing output folder and files and then re-generate the output folder&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${asdocOutput.dir}&quot;</span> <span style="color: #000066;">failOnError</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">includeEmptyDirs</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${asdocOutput.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>doc directory cleaned<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	Run the ASDoc executable and generate the ASDocs to the new output folder</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;generateASDocs&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;cleanASDocsDir, asDocsLog&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Run the ASDoc executable and generate the ASDocs to the new output folder&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Generating ASDocs&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exec</span> <span style="color: #000066;">executable</span>=<span style="color: #ff0000;">&quot;${asdoc.dir}&quot;</span> <span style="color: #000066;">failonerror</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-doc-sources ${asdocClassPath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-source-path '${srcpath.dir}'&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-external-library-path '${externalLib.dir}'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-window-title '${asdocsTitle}'&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-main-title '${asdocsTitle}'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-footer '${asdocsFooter}'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-output '${asdocOutput.dir}'&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;ASDocs created successfully&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	LOG writes asdoc output to log file: log.txt</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;asDocsLog&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;start the asdoc generation log&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;record</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;${asdocOutput.dir}/asdoc-log.txt&quot;</span> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">&quot;start&quot;</span> <span style="color: #000066;">append</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>Build.properties</strong></p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"># Home directory for flex sdk <span style="">3</span>, change this to build for Mac or PC using # as comment
<span style="color: #000099;">FLEX_HOME</span> 		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	sdks/flex-<span style="">3.2</span>-sdk</span>
flexTasks.jar		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	tools/FlexTasks/lib/flexTasks.jar</span>
srcpath.dir      	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../src</span>
externalLib.dir  	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../libs</span>
&nbsp;
# ASDoc
asdoc.dir		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	sdks/flex-<span style="">3.2</span>-sdk/bin/asdoc</span>
asdocOutput.dir  	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../html_docs</span>
<span style="color: #000099;">asdocClassPath</span> 		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 	$<span style="">&#123;</span>srcpath.dir<span style="">&#125;</span>/com</span>
<span style="color: #000099;">asdocsTitle</span> 		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 	ASDocs Test Library</span>
<span style="color: #000099;">asdocsFooter</span> 		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 	CONFIDENTIAL. Copyright <span style="">2009</span> My Company</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2009/01/10/compile-asdocs-with-ant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compile Flex applications using ANT</title>
		<link>http://www.lejnieks.com/2008/11/02/compile-flex-applications-using-ant/</link>
		<comments>http://www.lejnieks.com/2008/11/02/compile-flex-applications-using-ant/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 13:55:34 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Ant]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=61</guid>
		<description><![CDATA[A quick setup and example of how to compile a Flex application using ANT. This example will show the basics of how to run the ANT script to compile your flex application, I will walk through more complex examples in later posts but to get started look through the script and properties files below or [...]]]></description>
			<content:encoded><![CDATA[<p>A quick setup and example of how to compile a Flex application using ANT. This example will show the basics of how to run the ANT script to compile your flex application, I will walk through more complex examples in later posts but to get started look through the script and properties files below or download the attached project files at the bottom of this post.</p>
<p><a href="http://ant.apache.org/">ANT</a> is a very powerful tool that, once you get into using it, will make your development, deployment and automation a lot simpler as well a lot less prone to error. If you are new to <a href="http://ant.apache.org/">ANT</a> there are a lot of resources out on the web that will help you get up to speed. This post and others to follow will focus specifically on the uses of ANT with Flex in a CI build process.</p>
<p><span id="more-61"></span></p>
<p><strong>Ant Script</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FlexANTBuildSample&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;build&quot;</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	DEFINE import our build properties file and define our tasks</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;./build.properties&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;project.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${tools.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.jar&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;flexTasks.tasks&quot;</span> <span style="color: #000066;">classpath</span>=<span style="color: #ff0000;">&quot;${flexTasks.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;com/adobe/ac/ant/tasks/tasks.properties&quot;</span> <span style="color: #000066;">classpath</span>=<span style="color: #ff0000;">&quot;${flexAntTasks.jar}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;net/sf/antcontrib/antcontrib.properties&quot;</span> <span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">&quot;project.classpath&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	TARGETS</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init, clean, makeWrapper, compile&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	INITIALIZE</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;init&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Initializes the build&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;condition</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;environment.display&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;:1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;os</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Linux&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/condition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tstamp</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;=============================================&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;${project.name}-${project.version} [${TODAY}]&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Copyright (c) ${project.year} ${project.owner}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;OS : ${os.name}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Author: ${author}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;==============================================&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	CLEAN the existing output folder and files and then re-generate the output folder</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;deletes and recreates the metadata destination directory&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">verbose</span>=<span style="color: #ff0000;">&quot;${verbose}&quot;</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${deploy.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${deploy.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Deploy directory created&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	COMPILE</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;compile&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;compiles the Main app&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mxmlc</span> <span style="color: #000066;">context-root</span>=<span style="color: #ff0000;">&quot;main&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${mainApp.src}&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">output</span>=<span style="color: #ff0000;">&quot;${mainApp.swf}&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">actionscript-file-encoding</span>=<span style="color: #ff0000;">&quot;${encoding}&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">keep-generated-actionscript</span>=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">incremental</span>=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">locale</span>=<span style="color: #ff0000;">&quot;${locale}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;load-config</span> <span style="color: #000066;">filename</span>=<span style="color: #ff0000;">&quot;${FLEX_HOME}/frameworks/flex-config.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compiler.source-path</span> <span style="color: #000066;">path-element</span>=<span style="color: #ff0000;">&quot;${FLEX_HOME}/frameworks&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compiler.source-path</span> <span style="color: #000066;">path-element</span>=<span style="color: #ff0000;">&quot;${srcpath.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compiler.library-path</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${FLEX_HOME}/frameworks&quot;</span> <span style="color: #000066;">append</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;libs&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compiler.library-path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compiler.library-path</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${basedir}&quot;</span> <span style="color: #000066;">append</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;libs&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compiler.library-path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mxmlc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">	MAKE WRAPPER</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;copyTemplates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${deploy.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${htmltemplate.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exclude</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/index.template.html&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;makeWrapper&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;copies index.html wrapper and needed files from html-template directory&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;clean, copyTemplates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pageTitle&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${mainApp.name}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${htmltemplate.dir}/index.template.html&quot;</span> <span style="color: #000066;">tofile</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${title}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${pageTitle}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${swf}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${mainApp.name}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${width}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${height}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${bgcolor}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${mainApp.bgColor}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${application}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${mainApp.name}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${version_major}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;9&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${version_minor}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replace</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${deploy.dir}/index.html&quot;</span> <span style="color: #000066;">token</span>=<span style="color: #ff0000;">&quot;$${version_revision}&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;28&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>Build.properties</strong></p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">######################################
## Author information
######################################
<span style="color: #000099;">author</span>			<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	Kenneth Lejnieks</span>
project.owner		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	Lejnieks Consulting</span>
project.owner.url	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	http://www.lejnieks.com</span>
project.fullname		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	Build CI POC 1</span>
project.version		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	1.0.0 alpha  # major.minor<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>.revision<span style="">&#91;</span>.build<span style="">&#93;</span><span style="">&#93;</span></span></span>
project.name		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	POC Sample 1</span>
project.year		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	2009</span>
application.name	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	POC</span>
&nbsp;
&nbsp;
&nbsp;
######################################
## Path information
######################################
<span style="color: #000099;">FLEX_HOME</span>		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	sdks/flex-<span style="">3.2</span>-sdk</span>
&nbsp;
htmltemplate.dir	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../html-template</span>
srcpath.dir		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../src</span>
libs.dir  		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../libs</span>
tools.dir		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	tools</span>
&nbsp;
deploy.dir		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	../deploy</span>
&nbsp;
&nbsp;
&nbsp;
######################################
## Build arguments
######################################
<span style="color: #000099;">verbose</span>			<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	true</span>
&nbsp;
&nbsp;
&nbsp;
######################################
## Application information
######################################
mainApp.name		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	FlexCISample1</span>
mainApp.src		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	$<span style="">&#123;</span>srcpath.dir<span style="">&#125;</span>/$<span style="">&#123;</span>mainApp.name<span style="">&#125;</span>.mxml</span>
mainApp.swf		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	$<span style="">&#123;</span>deploy.dir<span style="">&#125;</span>/$<span style="">&#123;</span>mainApp.name<span style="">&#125;</span>.swf</span>
mainApp.bgColor		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	#f6f6f6</span>
<span style="color: #000099;">locale</span>			<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	en_US</span>
<span style="color: #000099;">encoding</span>		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	UTF-8</span>
&nbsp;
&nbsp;
&nbsp;
######################################
## Build Tools
######################################
flexTasks.jar		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	$<span style="">&#123;</span>FLEX_HOME<span style="">&#125;</span>/ant/lib/flexTasks.jar</span>
flexAntTasks.jar	<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	$<span style="">&#123;</span>tools.dir<span style="">&#125;</span>/FlexAntTasks.jar</span>
ant-contrib.jar		<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">	$<span style="">&#123;</span>tools.dir<span style="">&#125;</span>/ant-contrib.jar</span></pre></div></div>

<p>Project source files including necessary jars can be found <a href="http://projects.lejnieks.com/Flex CI Sample.zip">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2008/11/02/compile-flex-applications-using-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
