<?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>thecrumb.com &#187; Ant</title>
	<atom:link href="http://thecrumb.com/tag/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecrumb.com</link>
	<description>developer &#124; thinker &#124; tinkerer</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:28:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Automated Merge Notices</title>
		<link>http://thecrumb.com/2011/07/28/automated-merge-notices/</link>
		<comments>http://thecrumb.com/2011/07/28/automated-merge-notices/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 14:13:23 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://thecrumb.com/?p=1563</guid>
		<description><![CDATA[I&#8217;m working on a project with another developer and we&#8217;ve decided to create a branch for my changes. Heavy development continues in the trunk as well and I need to frequently merge the trunk into my branch. Being lazy of &#8230; <a href="http://thecrumb.com/2011/07/28/automated-merge-notices/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project with another developer and we&#8217;ve decided to create a branch for my changes.   Heavy development continues in the trunk as well and I need to frequently merge the trunk into my branch. Being lazy of course I didn&#8217;t want to do this manually :)<br />
<span id="more-1563"></span><br />
First I created a simple batch file. I&#8217;m doing an update on my local working copy to make sure it&#8217;s updated, then I run an Ant script.</p>
<pre class="brush: plain; title: ; notranslate">
REM Change to local working copy directory
cd c:\myproject

REM Run SVN update to verify working copy code is current
svn update 

REM Run merge target
ant -f c:\myproject\_build\build.xml email-merge-status
</pre>
<p>My Ant script simply runs the merge and sends me an email.  See my previous post (from 2006!) about <a href="http://thecrumb.com/2006/08/29/sending-email-from-ant/" title="Sending Email From Ant">sending email via Ant</a> if you need help configuring that.   All my properties <em>${something}</em> are defined in an external property file but you should get the idea.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;target name=&quot;email-merge-status&quot; depends=&quot;-init&quot; description=&quot;Send email with merge status&quot;&gt;
&lt;exec executable=&quot;svn&quot; outputproperty=&quot;svnmergeoutput&quot;&gt;
&lt;arg line=&quot;merge ${svn.trunk} ${path.branch} --dry-run&quot; /&gt;
&lt;/exec&gt;

&lt;mail mailhost=&quot;${mail.server}&quot; mailport=&quot;${mail.port}&quot; subject=&quot;${ant.project.name} Merge Status&quot;&gt;
&lt;from address=&quot;${mail.default.from}&quot; /&gt;
&lt;to address=&quot;${mail.default.to}&quot; /&gt;
&lt;message&gt;
Merge status for: ${ant.project.name}
Running:  merge ${svn.trunk} ${path.branch} --dry-run

=================================================================

${svnmergeoutput}
&lt;/message&gt;
&lt;/mail&gt;
&lt;/target&gt;
</pre>
<p>I&#8217;m using the <strong>&#8211;dry-run</strong> SVN option with the merge just so I can get an idea of how many conflicts I can expect. If there aren&#8217;t many I will remove that and automate the merge and possibly the commit as well.   </p>
<p>Now a few times I day I get a nicely formatted email that lets me know if I need to take action to update my branch:</p>
<blockquote><p>
Merge status for: IRBIS<br />
Running:  merge https://svn.myproject.some.url/svn/myproject/trunk/ c:/myproject &#8211;dry-run<br />
=================================================================<br />
&#8212; Merging r703 through r708 into &#8216;c:\myproject&#8217;:<br />
U    c:\myproject\admin_buckets_search.cfm<br />
U    c:\myproject\admin_gen_attachment_types.cfm<br />
U    c:\myproject\event_attachments.cfm<br />
U    c:\myproject\admin_gen_detail.cfm<br />
U    c:\myproject\wireframe\balsamiq_files\popup_existing_responses.bmml
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2011/07/28/automated-merge-notices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ant, MS SQL Server and Integrated Authentication</title>
		<link>http://thecrumb.com/2011/06/17/ant-ms-sql-server-and-integrated-authentication/</link>
		<comments>http://thecrumb.com/2011/06/17/ant-ms-sql-server-and-integrated-authentication/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 20:01:14 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://thecrumb.com/?p=1533</guid>
		<description><![CDATA[I&#8217;m trying to convert some of my common Ant database tasks to work with MS SQL Server. I quickly ran into an issue with SQL Server integrated authentication. My first stab was to simply provide a username and password: That &#8230; <a href="http://thecrumb.com/2011/06/17/ant-ms-sql-server-and-integrated-authentication/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to convert some of my common Ant database tasks to work with MS SQL Server.  </p>
<p>I quickly ran into an issue with SQL Server integrated authentication.<br />
<span id="more-1533"></span><br />
My first stab was to simply provide a username and password:</p>
<pre class="brush: plain; title: ; notranslate">
	&lt;target name=&quot;test&quot;&gt;
		&lt;sql driver=&quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;
			url=&quot;jdbc:sqlserver://localhost:1433;databaseName=test&quot;
			userid=&quot;myUsername&quot;
			password=&quot;myPassword&quot;
			print=&quot;TRUE&quot;&gt;
			SELECT CURRENT_TIMESTAMP
		&lt;/sql&gt;
	&lt;/target&gt;
</pre>
<p>That failed with a username, password error. </p>
<p>A quick Google later I discovered the &#8216;integratedSecurity&#8217; attribute. Note you now leave the username/password blank:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;target name=&quot;test&quot;&gt;
	&lt;sql driver=&quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;
		url=&quot;jdbc:sqlserver://localhost:1433;databaseName=test;integratedSecurity=true&quot;
		userid=&quot;&quot;
		password=&quot;&quot;
		print=&quot;TRUE&quot;&gt;
		SELECT CURRENT_TIMESTAMP
	&lt;/sql&gt;
&lt;/target&gt;
</pre>
<p>But that still bombed out. I was getting this error:</p>
<blockquote><p>SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.<br />
WARNING: Failed to load the sqljdbc_auth.dll</p></blockquote>
<p>Digging around I discovered this file is included in the JDBC driver download:</p>
<p><em>C:\Downloads\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\auth\x64\sqljdbc_auth.dll</em></p>
<p>There are several versions provided (IA64, x64, x86). Pick the one for your environment and copy it to your C:\Windows\system32 directory.</p>
<p>Your script should now work!</p>
<pre class="brush: plain; title: ; notranslate">
Buildfile: C:\build\db.build.xml
test:
      1 Executing commands
      1 2011-06-17 15:49:50.853
      1 0 rows affected
      1 1 of 1 SQL statements executed successfully
BUILD SUCCESSFUL
Total time: 1 second
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2011/06/17/ant-ms-sql-server-and-integrated-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AntForm &#8211; Easy Ant Form GUIs</title>
		<link>http://thecrumb.com/2011/06/14/antform-easy-ant-form-guis/</link>
		<comments>http://thecrumb.com/2011/06/14/antform-easy-ant-form-guis/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 17:34:49 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>

		<guid isPermaLink="false">http://thecrumb.com/?p=1528</guid>
		<description><![CDATA[While digging through the ColdBox documentation I discovered Luis was using AntForm to provide some simple Ant based form wizards. I&#8217;d never heard of AntForm before so I bookmarked it and finally found some time to check it out. AntForm &#8230; <a href="http://thecrumb.com/2011/06/14/antform-easy-ant-form-guis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While digging through the ColdBox documentation I discovered Luis was using <a href="http://antforms.sourceforge.net/">AntForm</a> to provide some simple Ant based form wizards.  I&#8217;d never heard of AntForm before so I bookmarked it and finally found some time to check it out.<br />
<span id="more-1528"></span><br />
AntForm bills itself as:</p>
<blockquote><p>AntForm is a java tool designed to add interaction to Ant scripts through graphical forms.</p></blockquote>
<p>Setup is like any other Ant tas. Download the .jar file, add a task definition and be on your way. Installation is <a href="http://antforms.sourceforge.net/installation.html">covered on the AntForm site</a>.</p>
<p>Within the download file AntForm includes a test.xml file which I&#8217;d suggest you start with. It has several good examples that can help you get started.  It gives a good example of the many controls available which allow you to build some very robust interfaces which I&#8217;ve captured in the screenshot below.  You can see some examples of password dialogs, tabs, radio buttons and more.</p>
<div id="attachment_1530" class="wp-caption aligncenter" style="width: 510px"><a href="http://thecrumb.com/wp-content/uploads/2011/06/antform.png"><img src="http://thecrumb.com/wp-content/uploads/2011/06/antform.png" alt="AntForm Examples" title="antform" width="500" height="459" class="size-full wp-image-1530" /></a><p class="wp-caption-text">AntForm Examples</p></div>
<p>I&#8217;ve certainly got some ideas on where I can use this!  If you haven&#8217;t checked out Ant yet check out my <a href="http://thecrumb.com/wiki/ant">Ant wiki</a> for some great resources to help you get started!</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2011/06/14/antform-easy-ant-form-guis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Maintenance Mode with Ant</title>
		<link>http://thecrumb.com/2011/03/10/easy-maintenance-mode-with-ant/</link>
		<comments>http://thecrumb.com/2011/03/10/easy-maintenance-mode-with-ant/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 14:39:29 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[automation]]></category>

		<guid isPermaLink="false">http://thecrumb.com/?p=1431</guid>
		<description><![CDATA[I usually have something in my application where I can flip a bit and turn on &#8220;maintenance mode&#8221; which displays a friendly message to users and allows me to do updates knowing no one is accessing the application. Today we&#8217;ll &#8230; <a href="http://thecrumb.com/2011/03/10/easy-maintenance-mode-with-ant/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I usually have something in my application where I can flip a bit and turn on &#8220;maintenance mode&#8221; which displays a friendly message to users and allows me to do updates knowing no one is accessing the application.</p>
<p>Today we&#8217;ll look at how you can implement this using <a href="http://ant.apache.org/">Ant</a>. </p>
<p>First we&#8217;ll update our index.cfm file and add some code to check a value and show our friendly message:</p>
<pre class="brush: coldfusion; title: ; notranslate">
&lt;cfset maintenanceMode = false&gt;
&lt;cfif maintenanceMode IS true&gt;
	&lt;h2&gt;Site Maintenance&lt;/h2&gt;
	&lt;p&gt;The application is currently unavailable. Please check back in a few minutes (or hours if we really screw something up).&lt;/p&gt;
	&lt;p&gt;We apologize for the inconvenience.&lt;/p&gt;
	&lt;cfabort&gt;
&lt;/cfif&gt;
</pre>
<p>So now we need to flip the bit on maintenanceMode.  </p>
<p>You <em>could</em> access the server, open the file with an editor and hope you don&#8217;t screw something up while editing the file&#8230;  or you could do it from the comfort of your IDE with Ant.  We will create a macrodef so we can use the same code to turn on/off maintenance mode in all our environments.</p>
<p>The macrodef code:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;macrodef name=&quot;maintenance-mode&quot; description=&quot;Enable or disable maintenance mode&quot;&gt;
	&lt;attribute name=&quot;mode&quot; default=&quot;false&quot;/&gt;
	&lt;attribute name=&quot;dest&quot;/&gt;
	&lt;sequential&gt;
		&lt;echo&gt;
			Setting mainenance mode to: @{mode} on ${path.@{dest}}
		&lt;/echo&gt;
		&lt;replaceregexp file=&quot;${path.@{dest}}/www/index.cfm&quot; match=&quot;maintenanceMode = (\w+)&quot; replace=&quot;maintenanceMode = @{mode}&quot;/&gt;
	&lt;/sequential&gt;
&lt;/macrodef&gt;
</pre>
<p>First we have defined some attributes we&#8217;ll pass in:</p>
<ul>
<li><strong>mode</strong> = true or false</li>
<li><strong>dest</strong> = destination &#8211; where the file lives we need to modify</li>
</ul>
<p>We will add an <em>echo</em> in there so we can see what&#8217;s going on when we run things, and finally we&#8217;ll use the <a href="http://ant.apache.org/manual/Tasks/replaceregexp.html">ReplaceRegexp</a> task to search for our string. We simply need to look for &#8220;maintenanceMode = whatever&#8221; and that&#8217;s easy to do with a regular expression. Then we simply update that string with the value we&#8217;ve passed in as &#8216;mode&#8217;.</p>
<blockquote><p>Tip: If you have problems with Regular Expressions check out the <a href="http://www.brosinski.com/regex/">RegEx Tester plugin</a> for Eclipse.</p></blockquote>
<p>Finally we will create two new targets to turn things on and off:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;target name=&quot;DEVELOPMENT-MAINTENANCE-ON&quot;&gt;
	&lt;maintenance-mode mode=&quot;true&quot; dest=&quot;development&quot;/&gt;
&lt;/target&gt;

&lt;target name=&quot;DEVELOPMENT-MAINTENANCE-OFF&quot;&gt;
	&lt;maintenance-mode mode=&quot;false&quot; dest=&quot;development&quot;/&gt;
&lt;/target&gt;
</pre>
<p>Here we define our &#8216;mode&#8217; and &#8216;destination&#8217; attributes.  The &#8216;development&#8217; destination is simply a property I have mapped in Ant which points to my web files.  Depending on how you access your files you may have to just through more hoops here.  </p>
<pre class="brush: plain; title: ; notranslate">
path.development = \\\\serverName\\Inetpub\\wwwroot\\www\\${ant.project.name}
</pre>
<p>Using a combination of properties and attributes: ${path.@{dest} this will give us the proper path to the file we need to change.  </p>
<p>You can easily create additional targets for production, etc.</p>
<p>And finally running this in Eclipse we can see:</p>
<pre class="brush: plain; title: ; notranslate">
Buildfile: D:\workspace\_build\build.xml
DEVELOPMENT-MAINTENANCE-OFF:
     [echo]
     [echo] Setting mainenance mode to: false on \\serverName\Inetpub\wwwroot\www\myproject
     [echo]
BUILD SUCCESSFUL
Total time: 1 second
</pre>
<p>For more on Ant check out my <a href="http://www.thecrumb.com/wiki/ant">Ant wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2011/03/10/easy-maintenance-mode-with-ant/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ant Meets MySQL</title>
		<link>http://thecrumb.com/2010/11/12/ant-meets-mysql/</link>
		<comments>http://thecrumb.com/2010/11/12/ant-meets-mysql/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 14:18:59 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://thecrumb.com/?p=1236</guid>
		<description><![CDATA[At my new job I&#8217;ve been using MySQL. When it got around to moving data around between servers and restoring my development database I looked at my existing scripts but they were all Oracle centric. I then looked to the &#8230; <a href="http://thecrumb.com/2010/11/12/ant-meets-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At my new job I&#8217;ve been using MySQL. When it got around to moving data around between servers and restoring my development database I looked at my existing scripts but they were all Oracle centric.</p>
<p>I then looked to the <a title="Ant Wiki" href="http://thecrumb.com/wiki/ant">Ant wiki</a> and much to my surprise there were no MySQL specific entries!</p>
<p>After a bit of Googling and tinkering however I&#8217;ve come up with a script that does simple dump/restore functions and should provide the basics for someone to expand on if they need more.</p>
<p>The script is available on my wiki: <a title="MySQL Ant Script" href="http://thecrumb.com/wiki/ant/database">http://thecrumb.com/wiki/ant/database</a></p>
<p>One interesting thing I ran into that had me stumped for an afternoon was defining my user/password as properties and passing them into my script.</p>
<p>I usually define all my properties in external files.  In this example I had the following defined:</p>
<ul>
<li><em><strong>db.local.username </strong>= myusername</em></li>
<li><em><strong>db.local.password</strong> = password</em></li>
</ul>
<p>And was using it like:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;exec executable=&quot;${path.mysql}/mysqldump&quot; input=&quot;dbscripts/@{filename}&quot;&gt;
&lt;arg value=&quot;--user=${db.@{server}.username}&quot;/&gt;
&lt;arg value=&quot;--password=${db.@{server}.password}&quot;/&gt;
&lt;arg value=&quot;--host=${db.@{server}}&quot;/&gt;
&lt;arg value=&quot;--port=3306&quot;/&gt;
&lt;arg value=&quot;@{database}&quot;/&gt;
&lt;/exec&gt;
</pre>
<p>When I ran this it bombed and I got a MySQL error.  I initially thought it was a MySQL permission error so I tested it via the command line and everything worked.</p>
<p>OK.</p>
<p>Then I swapped out the property values in my Ant script with hard coded values:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;exec executable=&quot;${path.mysql}/mysqldump&quot; input=&quot;dbscripts/@{filename}&quot;&gt;
&lt;arg value=&quot;--user=root&quot;/&gt;
&lt;arg value=&quot;--password=password&quot;/&gt;
&lt;arg value=&quot;--host=${db.@{server}}&quot;/&gt;
&lt;arg value=&quot;--port=3306&quot;/&gt;
&lt;arg value=&quot;@{database}&quot;/&gt;
&lt;/exec&gt;
</pre>
<p>I expected that to fail as well but it worked!  Weird.  I then tried all sorts of various combinations.  Eventually I tried using property names that did NOT include &#8216;<em>username</em>&#8216; and &#8216;<em>password</em>&#8216;.</p>
<ul>
<li><em><strong>db.local.un</strong> = myusername</em></li>
<li><em><strong>db.local.pw</strong> = mypassword</em></li>
</ul>
<pre class="brush: xml; title: ; notranslate">

&lt;exec executable=&quot;${path.mysql}/mysqldump&quot; input=&quot;dbscripts/@{filename}&quot;&gt;
&lt;arg value=&quot;--user=${&lt;strong&gt;db.@{server}.un&lt;/strong&gt;}&quot;/&gt;
&lt;arg value=&quot;--password=${&lt;strong&gt;db.@{server}.pw&lt;/strong&gt;}&quot;/&gt;
&lt;arg value=&quot;--host=${db.@{server}}&quot;/&gt;
&lt;arg value=&quot;--port=3306&quot;/&gt;
&lt;arg value=&quot;@{database}&quot;/&gt;
&lt;/exec&gt;
</pre>
<p>And that worked! Even when defined in an external property file.</p>
<p>I have no idea if &#8216;<em>username</em>&#8216; and &#8216;<em>password</em>&#8216; are some sort of reserved word.  I tried it in both Ant 1.7 and  1.8 with the same results.</p>
<p>The scripts on the wiki work in my environment  (Ant 1.7, Windows XP and MySQL 5.1.x) .</p>
<p>If you modify the scripts and do something interesting with them &#8211; please let me know!</p>
<p>And if you blow something up &#8211; <em>please don&#8217;t blame me</em>!</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2010/11/12/ant-meets-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ant Refcardz from DZone</title>
		<link>http://thecrumb.com/2010/06/28/ant-refcardz-from-dzone/</link>
		<comments>http://thecrumb.com/2010/06/28/ant-refcardz-from-dzone/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:47:56 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=1131</guid>
		<description><![CDATA[Today DZone release a new Refcardz for Ant: Getting Started with Apache Ant. This DZone Refcard will provide you with the perfect resource to help you automate software build processes with Apache Ant. Included is a description of the Anatomy &#8230; <a href="http://thecrumb.com/2010/06/28/ant-refcardz-from-dzone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today DZone release a new Refcardz for Ant: <a title="Ant Refcardz" href="http://refcardz.dzone.com/refcardz/getting-started-apache-ant?oid=hom24765">Getting Started with Apache Ant</a>.</p>
<blockquote><p>This DZone Refcard will provide you with the perfect resource to help  you automate software build processes with Apache Ant. Included is a  description of the Anatomy of an Ant Script along with a number of  tables detailing, among others: Core Java Related Tasks, Infrastructure  Tasks, and SCM Related Tasks.</p></blockquote>
<p>It is well laid out (like all the Refcradz) and covers the latest Ant  release &#8211; 1.8.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2010/06/28/ant-refcardz-from-dzone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing Arguments To Ant Using Eclipse</title>
		<link>http://thecrumb.com/2010/05/29/passing-arguments-to-ant-using-eclipse/</link>
		<comments>http://thecrumb.com/2010/05/29/passing-arguments-to-ant-using-eclipse/#comments</comments>
		<pubDate>Sat, 29 May 2010 20:03:03 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[CFEclipse]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=1122</guid>
		<description><![CDATA[Over the last few days I&#8217;ve been reworking one of my build files and needed to be able to pass in an argument at run time, which is easy to do using the command line.  But I became curious if &#8230; <a href="http://thecrumb.com/2010/05/29/passing-arguments-to-ant-using-eclipse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over the last few days I&#8217;ve been reworking one of my build files and needed to be able to pass in an argument at run time, which is easy to do using the command line.  But I became curious if there was any way to do it running the script within Eclipse.</p>
<p>Turns out it was easy.</p>
<p>Crank up the Ant view and right click on your build file:</p>
<div id="attachment_1123" class="wp-caption alignnone" style="width: 510px"><a href="http://thecrumb.com/wp-content/uploads/2010/05/antargs1.png"><img class="size-full wp-image-1123 " src="http://thecrumb.com/wp-content/uploads/2010/05/antargs1.png" alt="" width="500" height="270" /></a><p class="wp-caption-text">Run As</p></div>
<p>Click <strong>Run As</strong> and select <strong>External Tools Configuration</strong></p>
<div id="attachment_1124" class="wp-caption alignnone" style="width: 510px"><a href="http://thecrumb.com/wp-content/uploads/2010/05/antargs2.png"><img class="size-full wp-image-1124" src="http://thecrumb.com/wp-content/uploads/2010/05/antargs2.png" alt="" width="500" height="362" /></a><p class="wp-caption-text">External Tool Dialog</p></div>
<p>Click the <strong>Main </strong>tab and enter your Ant arguments in the arguments dialog. What is neat is you can create multiple configurations so you can run your build easily with different arguments.  Enter a friendly name and notice it show up on the file list on the left.</p>
<p>You can then right click on that name and duplicate it and then modify the arguments in the new config.</p>
<div id="attachment_1125" class="wp-caption alignnone" style="width: 421px"><a href="http://thecrumb.com/wp-content/uploads/2010/05/antargs3.png"><img class="size-full wp-image-1125" src="http://thecrumb.com/wp-content/uploads/2010/05/antargs3.png" alt="" width="411" height="307" /></a><p class="wp-caption-text">Duplicate</p></div>
<p>Now if you return to the Ant view, right click and select <strong>Run As&#8230;</strong> you will get a dialog with the configurations you defined&#8230;</p>
<div id="attachment_1126" class="wp-caption alignnone" style="width: 408px"><a href="http://thecrumb.com/wp-content/uploads/2010/05/antargs4.png"><img class="size-full wp-image-1126" src="http://thecrumb.com/wp-content/uploads/2010/05/antargs4.png" alt="" width="398" height="266" /></a><p class="wp-caption-text">Options</p></div>
<p>My Ant target looks like:</p>
<pre class="brush: plain; title: ; notranslate">
</pre>
<p>And we&#8217;ll replace ${myValue} with an argument I defined in my  configuration above (<em>-DmyValue=&#8221;Jim Likes Ant&#8221;</em>). Running my two options I defined will output</p>
<pre class="brush: plain; title: ; notranslate">

Buildfile: D:\workspace\ant\helloworld-1.xml
helloworld:
[echo] Hello World Jim Likes Ant
BUILD SUCCESSFUL
Total time: 122 milliseconds

Buildfile: D:\workspace\ant\helloworld-1.xml
helloworld:
[echo] Hello World Jim Hates Ant
BUILD SUCCESSFUL
Total time: 122 milliseconds
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2010/05/29/passing-arguments-to-ant-using-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting Ant Build Updates Via Growl</title>
		<link>http://thecrumb.com/2009/11/25/getting-ant-build-updates-via-growl/</link>
		<comments>http://thecrumb.com/2009/11/25/getting-ant-build-updates-via-growl/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 20:22:42 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[automation]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=986</guid>
		<description><![CDATA[I have a few build scripts that take some time to run and I hate staring at the Eclipse console to see how things are progressing.  I&#8217;ve heard of Growl before and today decided to see if I could make &#8230; <a href="http://thecrumb.com/2009/11/25/getting-ant-build-updates-via-growl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have a few build scripts that take some time to run and I hate staring at the Eclipse console to see how things are progressing.  I&#8217;ve heard of Growl before and today decided to see if I could make this work to popup notices during my build.</p>
<p>Growl is originally for the Mac but there is a port for Windows aptly named <a title="Growl For Windows" href="http://www.growlforwindows.com/gfw/">Growl For Windows</a>.  Download and install.  I also added the install path to my Windows PATH so I can run the growlnotify script from the command line.</p>
<p>Once you&#8217;ve done this you can verify it&#8217;s working by popping open a DOS box and typing:</p>
<pre class="brush: plain; title: ; notranslate">
C:&amp;gt; growlnotify &quot;THIS IS A TEST&quot;
</pre>
<p>And you should get a popup:</p>
<div id="attachment_988" class="wp-caption aligncenter" style="width: 286px"><img src="http://thecrumb.com/wp-content/uploads/2009/11/growl1.png" alt="Growl Popup" width="276" height="146" class="size-full wp-image-988" /><p class="wp-caption-text">Growl Popup</p></div>
<p>Next you&#8217;ll need to grab a few things so you can interact with Growl from Ant&#8230;</p>
<p>Download <a title="Growlbuildlistener" href="http://code.google.com/p/growlbuildlistener">growlbuildlistener</a></p>
<blockquote><p>An Ant BuildListener that displays notifications via Growl/JGrowl</p></blockquote>
<p>Follow the installation instructions (<a title="installation instructions" href="http://code.google.com/p/growlbuildlistener/wiki/README">in the wiki section</a>).</p>
<p>This simply involves downloading two files that contain jar files &#8211; you&#8217;ll need:</p>
<ul>
<li>the growllistener jar  (growllistener.jar)</li>
<li>the JGrowl jar (binaryblizzard.jar) (from <a href="http://homepage.mac.com/stevevm/JGrowl/JGrowl.tar.gz">JGrowl</a>)</li>
</ul>
<p>Drop those in your Ant lib folder, and in Eclipse make sure those jars are added to your classpath (Ant Home Entries).</p>
<p>Next you will need to add a listener so Ant can use the GrowlBuildListener.  Run the following line from a command prompt:</p>
<pre class="brush: plain; title: ; notranslate">set ANT_ARGS=-listener net.slimeslurp.growl.GrowlListener</pre>
<p>Next I had to add a new taskdef line to my build script:</p>
<pre class="brush: xml; title: ; notranslate">
</pre>
<p>And now you should be able to drop in a new GrowlEcho task in your build file wherever you want a popup to occur.</p>
<pre class="brush: xml; title: ; notranslate">
</pre>
<p>Now when I kick off my scripts I see something like this: <div id="attachment_987" class="wp-caption aligncenter" style="width: 210px"><img src="http://thecrumb.com/wp-content/uploads/2009/11/growl2.png" alt="Growl Example" width="200" height="328" class="size-full wp-image-987" /><p class="wp-caption-text">Growl Example</p></div></p>
<p>I did this mainly for fun but I can see some applicable uses for this.  Growl also looks neat because it appears you can configure it to push notices over the network.  So in theory I could setup everyone on my team with Growl and when someone kicked off a build we could all be notified.</p>
<p>If you come up with a creative use for this please let me know in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2009/11/25/getting-ant-build-updates-via-growl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cron For Windows</title>
		<link>http://thecrumb.com/2009/08/15/cron-for-windows/</link>
		<comments>http://thecrumb.com/2009/08/15/cron-for-windows/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 15:29:56 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[cfunited]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=904</guid>
		<description><![CDATA[Marc Escher ( http://mxunit.org/ ) gave a great presentation at CFUnited on automation: batch files, Ant, launchers and Jetty. One thing that came up during the discussion was a replacement for Scheduled Tasks on Windows which I (and apparently others) &#8230; <a href="http://thecrumb.com/2009/08/15/cron-for-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Marc Escher ( <a title="MXUnit" href="http://mxunit.org/">http://mxunit.org/</a> ) gave a great presentation at CFUnited on automation: batch files, Ant, launchers and Jetty. One thing that came up during the discussion was a replacement for Scheduled Tasks on Windows which I (and apparently others) have found unreliable.</p>
<p>Since I&#8217;m a Linux geek I&#8217;m familiar with <a href="http://en.wikipedia.org/wiki/Cron">cron</a> on Linux and went looking for a version for Windows.</p>
<blockquote><p>Cron enables users to schedule jobs (commands or shell scripts) to run automatically at a certain time or date.</p></blockquote>
<p>Turns out there are quite a few cron solutions available on Windows.  Most of them however were commercial solutions.  After a bit of digging I found nnCron ( <a title="nnCron" href="http://www.nncron.ru/">http://www.nncron.ru/</a> ).  nnCron has a commercial version but they offer a free &#8220;lite&#8221; version which covered the basic features I needed:</p>
<blockquote><p>nnCron LITE is a small, but full-featured scheduler that can start applications and open documents at a specified time or with specified frequency. nnCron LITE is a perfect freeware Windows clone of a well-known UNIX scheduler Cron (including all the useful Anacron features).</p></blockquote>
<p>Here are a few of the  features of nnCron LITE:</p>
<ul>
<li>it can be started as a system service or as a regular standalone application</li>
<li>it understands cron table format (Unix) and is managed with easy-to-edit text crontab files that are fully compatible with Unix crontabs</li>
<li>it can set and use environment variables</li>
<li> it can run applications authorized as currently logged user</li>
</ul>
<p>So far I&#8217;ve been using it to schedule a backup task I have for our JIRA and Confluence installs using SyncBack.  And I have a few system utilities setup (defrag, etc) that run occasionally.  Unlike Scheduled Task I&#8217;ve never had an issue with the nnCron service failing.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2009/08/15/cron-for-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Did Dreamweaver Determine Your Deployment Method?</title>
		<link>http://thecrumb.com/2009/07/21/did-dreamweaver-determine-your-deployment-method/</link>
		<comments>http://thecrumb.com/2009/07/21/did-dreamweaver-determine-your-deployment-method/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 17:59:24 +0000</pubDate>
		<dc:creator>Jim Priest</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[bolt]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://www.thecrumb.com/?p=884</guid>
		<description><![CDATA[I was reading Glyn Jackson&#8217;s insightful review of ColdFusion Builder and it got me thinking. It&#8217;s been years since I&#8217;ve worked in a shop where we used FTP to deploy files.  I always felt that manual FTP was the worst &#8230; <a href="http://thecrumb.com/2009/07/21/did-dreamweaver-determine-your-deployment-method/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was reading Glyn Jackson&#8217;s <a href="http://www.newebia.co.uk/blog/index.cfm/2009/7/21/ColdFusion-Builder-Review-My-First--Impression-After-a-long-day#comments">insightful review of ColdFusion Builder</a> and it got me thinking.</p>
<p>It&#8217;s been years since I&#8217;ve worked in a shop where we used FTP to deploy files.  I always felt that manual FTP was the worst possible way to move files around (this was before I discovered Ant).  I ended up moving files around with SVN (which I still do today but Ant is the middle man).</p>
<p>I also never used Dreamweaver. I went straight from Homesite to CFEclipse.</p>
<p>Glyn&#8217;s post got me thinking however.  Does Dreamweaver&#8217;s &#8216;site&#8217; feature force you into FTP?  Do people open Dreamweaver, assume the &#8216;site&#8217; feature is the only option and follow that path?</p>
<p>I&#8217;m seeing a lot of the same conversations resurrected with the release of ColdFusion Builder as I did when CFEclipse first appeared.  People struggling with Eclipse&#8217;s &#8220;project&#8221; concept. And the fact that FTP may not be the only option.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecrumb.com/2009/07/21/did-dreamweaver-determine-your-deployment-method/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

