<?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>Codedrop™ Weblog &#187; Build Automation</title>
	<atom:link href="http://www.codedrop.ca/blog/archives/category/programming/build-automation/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codedrop.ca/blog</link>
	<description>Drop'n some code and other tech tidbits...</description>
	<lastBuildDate>Sun, 01 Jan 2012 07:48:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Crontab Reference</title>
		<link>http://www.codedrop.ca/blog/archives/233</link>
		<comments>http://www.codedrop.ca/blog/archives/233#comments</comments>
		<pubDate>Wed, 29 Sep 2010 15:58:54 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/233</guid>
		<description><![CDATA[I continually forget the format for a crontab entry&#8230; here&#8217;s a quick reference for those of you who do too! Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>I continually forget the format for a crontab entry&#8230; here&#8217;s a quick reference for those of you who do too!</p>
<p><img style="max-width: 800px;" src="http://blog.linuxvin.com/wp-content/uploads/2010/07/crontab-syntax-300x121.gif" /></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=29a30767-9dc6-8500-a169-40c2834a6a03" /></div>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Crontab+Reference+http%3A%2F%2Ftinyurl.com%2F3zrywxb" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Crontab+Reference+http%3A%2F%2Ftinyurl.com%2F3zrywxb" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/233/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capistrano Callbacks</title>
		<link>http://www.codedrop.ca/blog/archives/196</link>
		<comments>http://www.codedrop.ca/blog/archives/196#comments</comments>
		<pubDate>Wed, 18 Nov 2009 18:51:10 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Capistrano]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/196</guid>
		<description><![CDATA[Neat way to pre-initalize something in capistrano before a task is run on :start do verifyParametersAndInitialize()end callback options: :before, triggered before a task is invoked :after, triggered after a task is invoked :start, triggered before a top-level task is invoked via the command-line :finish, triggered when a top-level task completes :load, triggered after all recipes [...]]]></description>
			<content:encoded><![CDATA[<p>Neat way to pre-initalize something in capistrano before a task is run</p>
<p><code>on :start do<br />  verifyParametersAndInitialize()<br />end</code></p>
<p>callback options:
<ol>
<li> :before, triggered before a task is invoked</li>
<li> :after, triggered after a task is invoked</li>
<li> :start, triggered before a top-level task is invoked via the command-line</li>
<li> :finish, triggered when a top-level task completes</li>
<li> :load, triggered after all recipes have loaded</li>
<li>:exit, triggered after all tasks have completed</li>
</ol>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=4f2cdfcc-4c28-8945-8c89-a12168624c3b" /></div>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Capistrano+Callbacks+http%3A%2F%2Ftinyurl.com%2F42lr3gj" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Capistrano+Callbacks+http%3A%2F%2Ftinyurl.com%2F42lr3gj" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automate your non-rails db migrations with Capistrano and AutoPatch</title>
		<link>http://www.codedrop.ca/blog/archives/191</link>
		<comments>http://www.codedrop.ca/blog/archives/191#comments</comments>
		<pubDate>Tue, 10 Nov 2009 20:53:38 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Migrations]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/?p=191</guid>
		<description><![CDATA[After working in a rails environment for the past year I found it terribly difficult to go back to traditional database deployment / upgrade practices. Migrations are a beautiful way to properly version, co-ordinate and apply the changes you need to your various database environments.  I never knew of a way to do this in [...]]]></description>
			<content:encoded><![CDATA[<p>After working in a rails environment for the past year I found it terribly difficult to go back to traditional database deployment / upgrade practices.</p>
<p>Migrations are a beautiful way to properly version, co-ordinate and apply the changes you need to your various database environments.  I never knew of a way to do this in a non-rails environment, until now. Step in <a href="http://autopatch.sourceforge.net/index.php">AutoPatch</a>.</p>
<p>Some alternatives to AutoPatch exist such as <a href="http://migrate4j.sourceforge.net/">migrate4j</a> and <a href="http://www.liquibase.org/">Liquibase</a>. Each with their own flavor of how to tackle the problem.  AutoPatch was the winner for me as you don&#8217;t have to write your migrations in some custom DSL (xml in the case of Liquibase, or java for migrate4j).  Our existing .sql scripts worked just fine!</p>
<p>Our shop is currently using <a href="http://www.capify.org/index.php/Capistrano">Capistrano</a> for deployments.  Blending Autopatch with Capistrano was relatively straightforward.  Below are two sample tasks that can be added to facilitate AutoPatch&#8217;s cmd line info and migrate calls.</p>
<p><code> desc "Display database migration levels."<br />
task :dbinfo do<br />
cmdAPClasspath = "#{deployDir}/applications/database/lib/oracle/ojdbc14_g.jar" \<br />
+ ":#{deployDir}/dist/prepare/database" \<br />
+ ":#{deployDir}/lib/java/tk-autopatch-1.2-b-cvs.jar" \<br />
+ ":#{deployDir}/lib/java/log4j-1.2.8.jar" \<br />
+ ":#{deployDir}/lib/java/commons-logging-1.0.3.jar" \<br />
+ ":#{deployDir}/lib/java/commons-collections-3.2.1.jar" \<br />
+ ":#{deployDir}/lib/java/commons-lang-2.2.jar" \<br />
+ ":#{deployDir}/lib/java/tk-util-1.1.2.jar"<br />
cmdAPPatchInfo = "java -cp #{cmdAPClasspath} " \<br />
+ "com.tacitknowledge.util.migration.jdbc.MigrationInformation </code><code>#{systemName}</code><code>"<br />
system(cmdAPPatchInfo)<br />
end</code></p>
<p><code>desc "Apply database migrations."<br />
task :dbmigrate do<br />
cmdAPClasspath = "#{deployDir}/applications/database/lib/oracle/ojdbc14_g.jar" \<br />
+ ":#{deployDir}/dist/prepare/database" \<br />
+ ":#{deployDir}/lib/java/tk-autopatch-1.2-b-cvs.jar" \<br />
+ ":#{deployDir}/lib/java/log4j-1.2.8.jar" \<br />
+ ":#{deployDir}/lib/java/commons-logging-1.0.3.jar" \<br />
+ ":#{deployDir}/lib/java/commons-collections-3.2.1.jar" \<br />
+ ":#{deployDir}/lib/java/commons-lang-2.2.jar" \<br />
+ ":#{deployDir}/lib/java/tk-util-1.1.2.jar"<br />
cmdAPPatch<code>I</code>nfo = "java -cp #{cmdAPClasspath} " \<br />
+ "com.tacitknowledge.util.migration.jdbc.StandaloneMigrationLauncher #{systemName}"<br />
system(cmdAPPatchInfo)<br />
end</code></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Automate+your+non-rails+db+migrations+with+Capistrano+and+AutoPatch+http%3A%2F%2Ftinyurl.com%2F3ly257l" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Automate+your+non-rails+db+migrations+with+Capistrano+and+AutoPatch+http%3A%2F%2Ftinyurl.com%2F3ly257l" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/191/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a default &#8216;usage&#8217; target for your ANT project builds</title>
		<link>http://www.codedrop.ca/blog/archives/121</link>
		<comments>http://www.codedrop.ca/blog/archives/121#comments</comments>
		<pubDate>Fri, 14 Aug 2009 17:14:13 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/121</guid>
		<description><![CDATA[I keep coming across instances of ant build files where developers have hard coded a usage target that outputs target actions.&#160; This is not required and should be avoided as it is often not maintained.&#160; Instead, properly maintain the description attribute of each target and use a default target as below:&#160;&#160; &#60;project name="foo" basedir="." default="usage"&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I keep coming across instances of ant build files where developers have hard coded a usage target that outputs target actions.&nbsp; This is not required and should be avoided as it is often not maintained.&nbsp; Instead, properly maintain the description attribute of each target and use a default target as below:&nbsp;&nbsp;<br />
<br/><br/></p>
<pre>
&lt;project name="foo" basedir="." default="usage"&gt;

...

&lt;target name="usage"&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;java classname="org.apache.tools.ant.Main"&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg value="-projecthelp"/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;classpath&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;pathelement location="${lib.dir}/ant/ant.jar"/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;pathelement location="${lib.dir}/ant/ant-launcher.jar"/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;pathelement location="${lib.dir}/ant/xerces_2.8.0.jar"/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/classpath&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/java&gt;
&nbsp;&nbsp;&nbsp; &lt;/target&gt;

...

&lt;/project&gt;
</pre>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=79307383-1e97-863a-86f6-4643f16acad8" /></div>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Create+a+default+%E2%80%98usage%E2%80%99+target+for+your+ANT+project+builds+http%3A%2F%2Ftinyurl.com%2F3dtse5w" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Create+a+default+%E2%80%98usage%E2%80%99+target+for+your+ANT+project+builds+http%3A%2F%2Ftinyurl.com%2F3dtse5w" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/121/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

