<?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>Enigmatic Thought &#187; ant</title>
	<atom:link href="http://blog.enigmaticthought.com/tag/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.enigmaticthought.com</link>
	<description>import com.enigmaticThought.blog;</description>
	<lastBuildDate>Fri, 25 Jun 2010 19:54:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Autobuilding a Flex app from an svn repository</title>
		<link>http://blog.enigmaticthought.com/2009/07/autobuilding-from-a-svn-repository/</link>
		<comments>http://blog.enigmaticthought.com/2009/07/autobuilding-from-a-svn-repository/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 15:30:23 +0000</pubDate>
		<dc:creator>Matt C</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[FlexSDK]]></category>
		<category><![CDATA[svn]]></category>
		<guid isPermaLink="false">http://enigmaticthought.com/?p=110</guid>
		<description><![CDATA[Where I work we have a couple of servers for testing, one of which is the &#8220;cutting edge&#8221; server that holds the latest swf from subversion. I use a couple of tools that keep it as up to date as possible thanks to an automated build &#038; deploy process that is triggered through SVN updates. [...]]]></description>
			<content:encoded><![CDATA[<p>Where I work we have a couple of servers for testing, one of which is the &#8220;cutting edge&#8221; server that holds the latest swf from subversion.  I use a couple of tools that keep it as up to date as possible thanks to an automated build &#038; deploy process that is triggered through SVN updates.  So let&#8217;s walk through everything and make it happen.</p>
<ol>
<li>Install <a href="http://ant.apache.org/">Apache Ant</a> &#8211; The build tool that binds it all together.  If you&#8217;re not familiar with Ant, it makes Flex compiling much easier.  It&#8217;s somewhat like Make, but with plugins that make magic work (as we&#8217;ll see) so we can use ant to do everything rather than worry about command line tools.</li>
<li>Test ant out by opening a command line and typing &#8220;ant&#8221;.  You should get a message about a build.xml file not existing.</li>
<li>Create your working directory.  Something like &#8220;C:\autobuild\&#8221;.  I&#8217;ll refer to it as the <i>autobuild</i> directory from here out</li>
<li>Create a &#8220;libs&#8221; directory under <i>autobuild</i>.  Since we don&#8217;t want to mess up your ant installation, we&#8217;re going to leave it alone.</li>
<li>Create a &#8220;source&#8221; directory under <i>autobuild</i>.  Go ahead and check out you latest into it since we&#8217;ll use it to test the flex copiler.</li>
<li>Install the <a href="http://www.adobe.com/products/flex/flexdownloads/">Flex SDK</a> &#8211; Since you&#8217;re reading this, you&#8217;ve probably already got this going.  This is so we can use the <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html">Flex Ant Tasks</a> to automate the compilation of the source code.  To do this, goto you <i>flex_builder_install</i>/sdks/<i>version</i>/ant directory and copy the flexTasks.jar files to <i>autobuild</i>/libs directory you just created.</li>
<li>Create a text file named build.properties in the <i>autobuild</i> directory. This is where the ant global variables are defined.  You must have a FLEX_HOME defined to use the Flex And Tasks and can define others to make your build file easier to understand.  This is probably something along the lines of:
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code11'); return false;">View Code</a> TEXT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11011"><td class="code" id="p110code11"><pre class="text" style="font-family:monospace;"> # Where Flex lives
 FLEX_HOME=C:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.2.0
&nbsp;
 # Where the Flex framework we want to compile with lives
 FRAMEWORK=${FLEX_HOME}/frameworks
&nbsp;
 # Directory where the app will be deployed
 DEPLOY_DIR=./deploy
&nbsp;
# Directory where the app will be deployed
SVN_DIR=./code</pre></td></tr></table></div>
</li>
<li>Create a text file named build.xml in the <i>autobuild</i> directory.  This is where you can define all your settings to make ant work.  The file should just be a reference to the build.properties, flexTasks, and then the mxmlc command:
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code12'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11012"><td class="code" id="p110code12"><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: #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;">default</span>=<span style="color: #ff0000;">&quot;main&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>
	<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;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;${basedir}/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;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>
    <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;${basedir}/build.properties&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;flexTasks.tasks&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> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;main&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: #000000; font-weight: bold;">&gt;</span></span>Using framework from: ${FLEX_HOME}<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;mxmlc</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${SVN_DIR}/FlexApp.mxml&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">output</span>=<span style="color: #ff0000;">&quot;${DEPLOY_DIR}/FlexApp.swf&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">use-network</span>=<span style="color: #ff0000;">&quot;true&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">actionscript-file-encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&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;">debug</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;en_US&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">incremental</span>=<span style="color: #ff0000;">&quot;true&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">show-actionscript-warnings</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<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;${FRAMEWORK}/flex-config.xml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source-path</span> <span style="color: #000066;">path-element</span>=<span style="color: #ff0000;">&quot;${FRAMEWORK}&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 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>
<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></td></tr></table></div>
<p>Then, from the <i>autobuild</i> directory run &#8220;ant&#8221; and make sure you get a swf in the <i>autobuild</i>/bin directory.  If you get a Java heap space error, you&#8217;ll have to increase Ant&#8217;s memory with a &#8220;set ANT_OPTS=-Xmx1024m&#8221; command on the command line before running ant to create an environment variable that will make Ant use more memory.</li>
<li>Now that we can compile the source, it&#8217;s time to make svn work.  This is a little trickier but <a href="http://subclipse.tigris.org/svnant.html">SvnAnt</a> helps out.  SvnAnt is the most complicated step, but it&#8217;s what makes the magic happen.  Go ahead and download the zip file, and copy the svnant.jar, svnClientAdapter.jar, and scnjavahl.jar files into your libs directory</li>
<li>You&#8217;ll also need a <a href="http://subclipse.tigris.org/wiki/JavaHL">JavaHL</a> to make it work.  Specifically the libsvnjavahl-1.dll from <a href="http://subversion.tigris.org/files/documents/15/43936/svn-win32-1.5.3_javahl.zip">this zip</a> will work.  If there&#8217;s a better route to the file, let me know.  Place the libsvnjavahl-1.dll file in the <i>autobuild</i> directory</li>
<li>Finally update your build.xml file.  Below the project tag add
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code13'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11013"><td class="code" id="p110code13"><pre class="xml" style="font-family:monospace;">	<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;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;${basedir}/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;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>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;typedef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;org/tigris/subversion/svnant/svnantlib.xml&quot;</span> <span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">&quot;classpath&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>
<p>And then, between your target and mxmlc tags add</p>
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code14'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11014"><td class="code" id="p110code14"><pre class="xml" style="font-family:monospace;">		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;svn</span> <span style="color: #000066;">username</span>=<span style="color: #ff0000;">&quot;svnuser&quot;</span> <span style="color: #000066;">password</span>=<span style="color: #ff0000;">&quot;svnpass&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checkout</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;url/to/Repos&quot;</span> <span style="color: #000066;">destPath</span>=<span style="color: #ff0000;">&quot;${SVN_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;/svn<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>
</li>
<li>Now to test SVN. go ahead and delete everything in your bin and source directories and type &#8220;ant&#8221; from the command line.  You should see a big checkout, then a compile, and get a swf in the bin directory.  if there was a problem, check your svn path and make sure you&#8217;re checking out the proper directory and not getting the full svn tree</li>
<li>Now that we have a checkout and build, we just need to ftp the swf onto our server.  <a href="http://ant.apache.org/manual/OptionalTasks/ftp.html">Ant&#8217;s FTP lib</a> will do that wonderfully, we just have to get the proper jar files since they&#8217;re not included in the default ant setup.  You can download the <a href="http://commons.apache.org/net/index.html">Jakarta Commons Net</a> binary and then copy the commons-net-2.0.jar and commons-net-ftp-2.0.jar file to your <i>autobuild</i>/libs directory</li>
<li>Update your build.xml file with a new taskdef (just place it below the flexTasks one):
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code15'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11015"><td class="code" id="p110code15"><pre class="xml" style="font-family:monospace;">	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ftp&quot;</span> <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;org.apache.tools.ant.taskdefs.optional.net.FTP&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>
<p>And then actually create an ftp task after the build step:</p>
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code16'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11016"><td class="code" id="p110code16"><pre class="xml" style="font-family:monospace;">		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ftp</span> 	<span style="color: #000066;">server</span>=<span style="color: #ff0000;">&quot;{server}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">userid</span>=<span style="color: #ff0000;">&quot;{server}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">password</span>=<span style="color: #ff0000;">&quot;{ftpPassword}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">remotedir</span>=<span style="color: #ff0000;">&quot;{dir for swf}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">passive</span>=<span style="color: #ff0000;">&quot;yes&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;${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;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.swf&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;/ftp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>
</li>
<li>The final Ant step is to test it all.  Because of the way the Ant FTP library works you have to use &#8220;ant -lib libs&#8221; to load the commons-net files.  You should see a [ftp] action after the [mxmlc] reports the file name and the file should show up on your server.  If it does, everything worked out and you&#8217;ve automated your build &#038; deployment.  Now you just need to trigger it</li>
<li>First, create a batch file to call Ant and make sure everythings set up properly.  Mine looks like this:
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p110code17'); return false;">View Code</a> TEXT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11017"><td class="code" id="p110code17"><pre class="text" style="font-family:monospace;">c:
cd C:\autobuild
set ANT_OPTS=-Xmx1024m
ant -lib &quot;libs&quot;</pre></td></tr></table></div>
</li>
<li>I use <a href="http://tools.tortoisesvn.net/CommitMonitor">Commit Monitor</a> which is a SVN repository monitor than can be set up to check the repository on a schedule and, if changes are found, run a program (or in this case, a batch file).  Go ahead and install it and set the batch file to run when new commits are detected.</li>
<li>Sit back and watch the magic happen</li>
</ol>
<p>Just to make it simpler, here are the files we created:</p>
<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://blog.enigmaticthought.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=110&amp;download=build.properties">build.properties</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11018"><td class="code" id="p110code18"><pre class="text" style="font-family:monospace;"> #SVN location
 urlRepos=&lt;svn address&gt;
&nbsp;
 # Where Flex lives
 FLEX_HOME=C:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.2.0
&nbsp;
 # Where the Flex framework we want to compile with lives
 FRAMEWORK=${FLEX_HOME}/frameworks
&nbsp;
 # Directory where the app will be deployed
 DEPLOY_DIR=./bin
&nbsp;
 # Directory where the app will be deployed
 SVN_DIR=./source
&nbsp;
 # Server to upload completed swf
  HOST_SERVER=&lt;serverURL&gt;</pre></td></tr></table></div>
<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://blog.enigmaticthought.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=110&amp;download=build.xml">build.xml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11019"><td class="code" id="p110code19"><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: #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;">default</span>=<span style="color: #ff0000;">&quot;main&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>
	<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;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;${basedir}/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;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>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;typedef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;org/tigris/subversion/svnant/svnantlib.xml&quot;</span> <span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">&quot;classpath&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;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${basedir}/build.properties&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;flexTasks.tasks&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;">name</span>=<span style="color: #ff0000;">&quot;ftp&quot;</span> <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;org.apache.tools.ant.taskdefs.optional.net.FTP&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;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;main&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;svn</span> <span style="color: #000066;">username</span>=<span style="color: #ff0000;">&quot;svnuser&quot;</span> <span style="color: #000066;">password</span>=<span style="color: #ff0000;">&quot;svnpass&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checkout</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;${urlRepos}&quot;</span> <span style="color: #000066;">destPath</span>=<span style="color: #ff0000;">&quot;${SVN_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;/svn<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: #000000; font-weight: bold;">&gt;</span></span>Using framework from: ${FLEX_HOME}<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;mxmlc</span> 	<span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${SVN_DIR}/FlexApp.mxml&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">output</span>=<span style="color: #ff0000;">&quot;${DEPLOY_DIR}/FlexApp.swf&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">use-network</span>=<span style="color: #ff0000;">&quot;true&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">actionscript-file-encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&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;">debug</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;en_US&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">incremental</span>=<span style="color: #ff0000;">&quot;true&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">show-actionscript-warnings</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<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;${FRAMEWORK}/flex-config.xml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source-path</span> <span style="color: #000066;">path-element</span>=<span style="color: #ff0000;">&quot;${FRAMEWORK}&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 style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ftp</span> 	<span style="color: #000066;">server</span>=<span style="color: #ff0000;">&quot;{server}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">userid</span>=<span style="color: #ff0000;">&quot;{server}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">password</span>=<span style="color: #ff0000;">&quot;{ftpPassword}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">remotedir</span>=<span style="color: #ff0000;">&quot;{dir for swf}&quot;</span></span>
<span style="color: #009900;">				<span style="color: #000066;">passive</span>=<span style="color: #ff0000;">&quot;yes&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;${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;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.swf&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;/ftp<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>
<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></td></tr></table></div>
<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://blog.enigmaticthought.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=110&amp;download=build.bat">build.bat</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11020"><td class="code" id="p110code20"><pre class="text" style="font-family:monospace;">c:
cd C:\autobuild
set ANT_OPTS=-Xmx1024m
ant -lib &quot;libs&quot;</pre></td></tr></table></div>
<h3 class='related_post_title'>Related Posts (generated):</h3>
<ul class='related_post'>
<li><a href='http://enigmaticthought.com/2009/07/bug-hunting-fx-1/' title='Bug hunting in the Flex SDK (part 1)'>Bug hunting in the Flex SDK (part 1)</a></li>
<li><a href='http://enigmaticthought.com/2009/11/scientific-notation-patch-accepted/' title='Scientific Notation Patch Accepted'>Scientific Notation Patch Accepted</a></li>
<li><a href='http://enigmaticthought.com/2009/08/flex-open-iteration-meeting-2/' title='Flex OIM review'>Flex OIM review</a></li>
<li><a href='http://enigmaticthought.com/2009/08/flex-open-iteration-meeting/' title='Flex Open Iteration Meeting'>Flex Open Iteration Meeting</a></li>
<li><a href='http://enigmaticthought.com/2009/08/objectutil-compare-patch-3-with-feeling/' title='ObjectUtil.compare() Patch 3 (with feeling!)'>ObjectUtil.compare() Patch 3 (with feeling!)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.enigmaticthought.com/2009/07/autobuilding-from-a-svn-repository/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
