<?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>Renaissance Developer &#187; Build Automation</title>
	<atom:link href="http://www.exubero.com/joe/category/build-automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exubero.com/joe</link>
	<description>Follically Challenged in a Hirsute World</description>
	<lastBuildDate>Sat, 01 May 2010 04:11:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASL Compatability Policy</title>
		<link>http://www.exubero.com/joe/2009/09/asl-compatability-policy/</link>
		<comments>http://www.exubero.com/joe/2009/09/asl-compatability-policy/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 23:08:04 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=388</guid>
		<description><![CDATA[An astute reader asked if the Ant Script Library will be updated to make use of any of the new features that will be available in the upcoming Ant 1.8 release. New features include enhancements to boolean properties, the import element to support optional imports, and new features such as include and target group. Many [...]]]></description>
			<content:encoded><![CDATA[<p>An astute reader asked if the <a href="http://www.exubero.com/asl/">Ant Script Library</a> will be updated to make use of any of the new features that will be available in the upcoming Ant 1.8 release. New features include enhancements to boolean properties, the import element to support optional imports, and new features such as include and target group. Many of these features can help simplify complex build scripts, and could make a big difference to something like the <acronym title="Ant Script Library">ASL</acronym> (indeed, <a href="http://www.easyant.org">EasyAnt</a> has been a driver behind some of these features).  So when Ant 1.8 is released, will I make use of these new features?</p>
<p>Short answer: No</p>
<p>Slightly longer answer: Not yet.</p>
<p>Long answer: As a matter of policy, after Ant 1.8 is released, I will avoid making use of any 1.8 specific features for a relatively long period. I will definitely make sure that the <acronym title="Ant Script Library">ASL</acronym> is fully compatible with Ant 1.8, but it will still be fully compatible with Ant 1.7.</p>
<p>This is because the <acronym title="Ant Script Library">ASL</acronym> is intended to be used as an add-on library to an existing ant infrastructure. However, in my experience many companies and IDEs are quite conservative in upgrading their Ant installations. Probably in a year or two after Ant 1.8 is released, I might feel comfortable in adding dependencies on the latest features (probably keeping a 1.7 compatible branch of the <acronym title="Ant Script Library">ASL</acronym> available for a longer time). By that time I expect that Ant 1.8 will have made inroads to corporate build installations and IDEs. However, I&#8217;ve worked in places where Ant 1.7 (now 3 years old!) is still under consideration. If history is anything to judge, there will be a long period before Ant 1.8 makes it into some development shops.</p>
<p>I would regard this as probably the major difference in philosophy between <acronym title="Ant Script Library">ASL</acronym> and EasyAnt:</p>
<ul>
<li>EasyAnt is a <em>replacement</em> for Ant. It extends the internals of Ant to add non-standard features (e.g. &#8220;phases&#8221;). It is invoked by calling a completely different front end script. It contains an embedded and modified version of Ant, which must be installed separately. This gives them the freedom to make full use of new features, but it means a full switchover is required.</li>
<li><acronym title="Ant Script Library">ASL</acronym> is less ambitious (it&#8217;s <em>just</em> a library), but I think it makes it easier to accept in more conservative organisations that are happy with Ant, but are looking for a way to control build script complexity. For this reason, the <acronym title="Ant Script Library">ASL</acronym> must be more conservative, too (though I might end up having two versions of the <acronym title="Ant Script Library">ASL</acronym>, one for Ant 1.7 and another for Ant 1.8)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/09/asl-compatability-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CITCON &#8216;09: Better Ant Builds</title>
		<link>http://www.exubero.com/joe/2009/09/citcon-09-better-ant-builds/</link>
		<comments>http://www.exubero.com/joe/2009/09/citcon-09-better-ant-builds/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 20:53:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Continuous Integration]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=376</guid>
		<description><![CDATA[The first session I attended (and partially ran) was Better Ant Builds.
During the session proposals, Ivan Moore originally suggested a talk on better builds for Java programs. There were later proposals for sessions regarding improvements to Maven, so I proposed my own session &#8220;Better Ant Builds&#8221; to differentiate it from the Maven sessions.
My main goal [...]]]></description>
			<content:encoded><![CDATA[<p>The first session I attended (and partially ran) was Better Ant Builds.</p>
<p>During the session proposals, Ivan Moore originally suggested a talk on better builds for Java programs. There were later proposals for sessions regarding improvements to Maven, so I proposed my own session &#8220;Better Ant Builds&#8221; to differentiate it from the Maven sessions.</p>
<p>My main goal was to promote by own contribution to this area: the <a href="http://www.exubero.com/asl/">Ant Script Library</a>. JTF knew about this, and asked some leading questions when I proposed the talk about my library, which I thought was funny. I thought it would have been a bit too cheeky to give a great big marketing pitch, but then again I&#8217;m not the best marketer. Thanks for the push, Jeff!</p>
<p>Despite there being no projector available, I was able to talk a fair bit about the ASL, along with some of it&#8217;s background and design. People seemed interested, which I&#8217;m taking as a good sign. I won&#8217;t go into details, the <a href="http://www.exubero.com/asl/">website</a> already has everything I discussed.</p>
<p>Jeff also pointed out the <a href="http://code.google.com/p/ant-master-build-scripts/">Ant Master Build Scripts</a>, which at a glance seems to be a very similar project to the ASL. Looking at them, I&#8217;m pretty impressed. The author of those scripts presented a session at JavaOne called &#8220;<a href="http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-4166&amp;yr=2009&amp;track=javase">Object Oriented Ant Scripts for the Enterprise</a>&#8220;, which I think nails the leading design principles for reusable Ant scripts. I&#8217;d say the the master build scripts have a higher emphasis on J2EE projects, which the ASL leans more to building Java libraries, applications and static analysis. Plenty of room for both projects to grow!</p>
<p>The main question I had for the group was this: &#8220;How do you test an Ant script&#8221;? Historically, this has not been a problem. You wrote a script for a specific project. You ran the script, and it either worked or it didn&#8217;t. However, the Ant Script Library doesn&#8217;t have it&#8217;s own project &#8211; it is reused to build other projects. From my point of view, I really want to be able to set up an &#8220;integration test&#8221;. The answer is pretty obvious: set up a real project that you can use to run the ant script against. After running the script, you should be able to assert that artifacts are created in the expected locations. Duh! (in hindsight, anyway)</p>
<p>One more good tip: <a href="http://github.com/">GitHub</a> is a good place to set up an open source project. Another alternative might be <a href="http://code.google.com/">Google Code</a>. Currently, I&#8217;m running ASL from my own Subversion server. I&#8217;m thinking about moving to a location that can handle proper project infrastructure (version control, wiki, mailing lists, etc). Personally, I really like subversion, and I think it&#8217;s a pretty nice way to integrate ASL with your own project using svn:externals (assuming you&#8217;re using Subversion, too). Google Code uses Subversion, but GitHub uses another version control system I can&#8217;t remember (oh, wait: Git). Food for thought; I&#8217;ll think about that one for a bit.</p>
<p>For more details of the session, there is a <a href="http://citconf.com/wiki/index.php?title=BetterAntBuilds">write up on the wiki</a>.</p>
<p><strong>Update</strong>: The Build Doctor was actually taking good notes (as opposed to my vague recollection from 2 days later), and has a lot more detail in his <a href="http://www.build-doctor.com/2009/09/20/better-apache-ant-builds">own blog post</a> on the discussion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/09/citcon-09-better-ant-builds/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ant Script Library 1.1.0 Released</title>
		<link>http://www.exubero.com/joe/2009/09/ant-script-library-1-1-0-released/</link>
		<comments>http://www.exubero.com/joe/2009/09/ant-script-library-1-1-0-released/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 22:49:08 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=367</guid>
		<description><![CDATA[It&#8217;s been over 6 months since the last release, so I&#8217;m well overdue for this: I&#8217;ve just released version 1.1.0 of the Ant Script Library.
There are quite a number of small enhancements throughout the library, and I&#8217;ve been filling in missing documentation, too. Here&#8217;s a summary of the major changes between version 1.0.2 and 1.1.0:

Added [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been over 6 months since the last release, so I&#8217;m well overdue for this: I&#8217;ve just released version 1.1.0 of the <a href="http://www.exubero.com/asl/">Ant Script Library</a>.</p>
<p>There are quite a number of small enhancements throughout the library, and I&#8217;ve been filling in missing documentation, too. Here&#8217;s a summary of the major changes between version 1.0.2 and 1.1.0:</p>
<ul>
<li>Added new release module <a href="http://www.exubero.com/asl/asl-release.html">asl-release.xml</a>.</li>
<li>Added application package module <a href="http://www.exubero.com/asl/asl-java-package.html">asl-java-package.xml</a>.</li>
<li>Updated documentation for <a href="http://www.exubero.com/asl/asl-java-report.html">reports module</a></li>
<li>New Java static analysis reports:
<ul>
<li><a href="http://www.exubero.com/asl/asl-java-report.html#report-checkstyle">Checkstyle report</a></li>
<li><a href="http://www.exubero.com/asl/asl-java-report.html#report-findbugs">FindBugs report</a></li>
<li><a href="http://www.exubero.com/asl/asl-java-report.html#report-cpd">Copy/paste detection report</a></li>
</ul>
</li>
<li>Added new SCM modules:
<ul>
<li><a href="http://www.exubero.com/asl/asl-scm-svn.html">Subversion module</a></li>
<li><a href="http://www.exubero.com/asl/asl-scm-p4.html">Perforce module</a></li>
</ul>
</li>
<li>New introductory <a href="http://www.exubero.com/asl/tutorial.html">tutorial</a></li>
<li>Enhancements to the <a href="http://www.exubero.com/asl/asl-repo-ivy.html">Ivy tasks</a></li>
<li>Link generated JavaDoc to JRE JavaDoc</li>
</ul>
<p>Please go to the <a href="http://www.exubero.com/asl/download.html">download page</a> if you want to try it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/09/ant-script-library-1-1-0-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trends in Build Metrics</title>
		<link>http://www.exubero.com/joe/2009/07/trends-in-build-metrics/</link>
		<comments>http://www.exubero.com/joe/2009/07/trends-in-build-metrics/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 22:43:15 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=231</guid>
		<description><![CDATA[I&#8217;ve been upgrading the Ant Script Library with a number of new code inspection reports, including FindBugs, Checkstyle and PMD Copy Paste Detection; this is on top of the existing PMD Analysis, Cobertura and JDepend reports. (Note that these updates have not yet been released). I was thinking about adding in Panopticode, too. I love [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been upgrading the <a href="http://www.exubero.com/asl/">Ant Script Library</a> with a number of new code inspection reports, including <a href="http://findbugs.sourceforge.net">FindBugs</a>, <a href="http://checkstyle.sourceforge.net/">Checkstyle</a> and <a href="http://pmd.sourceforge.net/cpd.html">PMD Copy Paste Detection</a>; this is on top of the existing <a href="http://pmd.sourceforge.net">PMD Analysis</a>, <a href="http://cobertura.sourceforge.net">Cobertura</a> and <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> reports. (Note that these updates have not yet been released). I was thinking about adding in <a href="http://www.panopticode.org/">Panopticode</a>, too. I love the heatmap display, but I noticed that the project appears to be abandoned at the moment, without any updates for over 2 years. Perhaps I still will later on.</p>
<p>All the above reports give a great way to view the state of the code at a given time. One thing missing from those is trends over time. Trend information can help give you an idea of how a system is improving (or getting worse!) over time, and so enable better architectural oversight. For that reason, I started looking around for tools to help me there. I found three that I liked:</p>
<ul>
<li><a href="http://sonar.codehaus.org/">Sonar</a> appears to be the most advanced at the moment, at it has some great reports (check out the publicly available Sonar reports on <a href="http://nemo.sonarsource.org/">Nemo</a>). I have one problem, though: Sonar requires Maven to run. I&#8217;m loath to add a complete competing build system to the <acronym title="Ant Script Library">ASL</acronym>.</li>
<li><a href="http://qalab.sourceforge.net/">QALab</a> looks interesting, but it also looks to be an abandoned project, with no update for over three years.</li>
<li><a href="http://xradar.sourceforge.net/">XRadar</a> appears to be the best bet at the moment, a new version was released a few weeks ago. It looks quite comprehensive.</li>
</ul>
<p>Does anyone else have any recommondations for tools?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/07/trends-in-build-metrics/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Build Doctor Giveaway</title>
		<link>http://www.exubero.com/joe/2009/06/build-doctor-giveaway/</link>
		<comments>http://www.exubero.com/joe/2009/06/build-doctor-giveaway/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 21:19:38 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Continuous Integration]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=330</guid>
		<description><![CDATA[The Build Doctor is running a competition to win some swag donated by Atlassian. The catch is you have to tell a short story about your best or worst (or best and worst) build/deployment experience. The deadline is this Friday, so get cracking!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.build-doctor.com/">The Build Doctor</a> is running a <a href="http://www.build-doctor.com/2009/06/16/atlassian-bamboo-giveaway">competition</a> to win some swag donated by Atlassian. The catch is you have to tell a short story about your best or worst (or best and worst) build/deployment experience. The deadline is this Friday, so get cracking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/06/build-doctor-giveaway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ant Script Library 1.0.2 Released</title>
		<link>http://www.exubero.com/joe/2009/02/ant-script-library-102-released/</link>
		<comments>http://www.exubero.com/joe/2009/02/ant-script-library-102-released/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 21:53:43 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=261</guid>
		<description><![CDATA[I&#8217;ve just released a new version of the Ant Script Library (1.0.2). The scripts themselves have only had a few incremental changes, but there has been a large amount of updates to the documentation (though there&#8217;s still a long way to go there, I&#8217;m afraid).
The major changes are:

I&#8217;ve reworked the website to give it a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released a new version of the Ant Script Library (1.0.2). The scripts themselves have only had a few incremental changes, but there has been a large amount of updates to the documentation (though there&#8217;s still a long way to go there, I&#8217;m afraid).</p>
<p>The major changes are:</p>
<ul>
<li>I&#8217;ve reworked the website to give it a distinct style from the rest of exubero.com, which is much more in line with its Ant focus. See <a title="Ant Script Library" href="http://www.exubero.com/asl/">http://www.exubero.com/asl/</a> for the skinny on that.</li>
<li>The documentation is now packaged along with the scripts, making them available offline</li>
<li>I&#8217;ve excluded a large number of optional library jars from the default download. If you call any script target that requires an optional jar, you will be prompted to run the automatic download script. This makes the download much smaller for those people who don&#8217;t use any of the reporting features.</li>
<li>There is a new installer module (asl-java-install.xml). This can be used to install an application jar, along with all its library dependencies and configuration into an application assembly.</li>
</ul>
<p>To get a copy, please visit the <a href="http://www.exubero.com/asl/download.html">download page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/02/ant-script-library-102-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documenting Ant Scripts</title>
		<link>http://www.exubero.com/joe/2009/02/documenting-ant-scripts/</link>
		<comments>http://www.exubero.com/joe/2009/02/documenting-ant-scripts/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 23:34:56 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=245</guid>
		<description><![CDATA[I&#8217;ve had some fun evenings over the last week writing some documentation for the Ant Script Library. And by &#8220;fun&#8220;, I actually mean &#8220;tedious&#8220;. Unfortunately, this sort of thing is needed when you&#8217;re writing build files that are intended for a wider audience.
So far, I&#8217;ve managed to write some fairly complete documentation for the asl-java-build.xml [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had some fun evenings over the last week writing some documentation for the <a href="http://www.exubero.com/asl/">Ant Script Library</a>. And by &#8220;<em>fun</em>&#8220;, I actually mean &#8220;<em>tedious</em>&#8220;. Unfortunately, this sort of thing is needed when you&#8217;re writing build files that are intended for a wider audience.</p>
<p>So far, I&#8217;ve managed to write some fairly complete documentation for the <a href="http://www.exubero.com/asl/asl-java-build.html">asl-java-build.xml</a> module, but there&#8217;s still a long way to go for the other modules. In writing these, I&#8217;ve discovered some pretty neat tools: <a href="http://www.yworks.com/en/products_yed_about.html">yEd</a> and <a href="http://www.nongnu.org/kimagemap/">KImageMapEditor</a>. yEd makes it trivial to read in an Ant build file and generate a dependency diagram, while KImageMapEditor makes it a snap to add links without having to break up the diagrams. This is probably old hat to a number of people out there, but I&#8217;ve found it very interesting to catch up on these tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/02/documenting-ant-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ant Script Library Project Page</title>
		<link>http://www.exubero.com/joe/2009/02/ant-script-library-project-page/</link>
		<comments>http://www.exubero.com/joe/2009/02/ant-script-library-project-page/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 04:07:52 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=237</guid>
		<description><![CDATA[I&#8217;ve just set up a new home page for the Ant Script Library here:
http://www.exubero.com/asl/index.html
There&#8217;s still a lot to do in terms of documenting the scripts, but I was able to create this handy visualisation of the ASL target dependencies:

(This image was generated by yEd &#8211; thanks yWorks!)
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just set up a new home page for the Ant Script Library here:</p>
<p><a title="Ant Script Library" href="http://www.exubero.com/asl/index.html">http://www.exubero.com/asl/index.html</a></p>
<p>There&#8217;s still a lot to do in terms of documenting the scripts, but I was able to create this handy visualisation of the <acronym title="Ant Script Library">ASL</acronym> target dependencies:</p>
<p><img src="http://www.exubero.com/asl/asl-targets.png" alt="Target dependencies in the Ant Script Library" /></p>
<p>(This image was generated by <a href="http://www.yworks.com/en/products_yed_about.html">yEd</a> &#8211; thanks yWorks!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/02/ant-script-library-project-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design Principles for the Ant Script Library</title>
		<link>http://www.exubero.com/joe/2009/01/design-principles-for-the-ant-script-library/</link>
		<comments>http://www.exubero.com/joe/2009/01/design-principles-for-the-ant-script-library/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 00:52:45 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=233</guid>
		<description><![CDATA[I&#8217;ve uploaded an updated version of the Ant Script Library. It contains support for executable jars, wars, and Apache Ivy. It can be downloaded here:
http://www.exubero.com/asl/ant-script-library-1.0.1.zip
I&#8217;m getting around to writing more complete documentation for how to use these, but for the moment I wanted to explain the considerations behind design of these scripts (referred to as [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve uploaded an updated version of the Ant Script Library. It contains support for executable jars, wars, and Apache Ivy. It can be downloaded here:</p>
<p><a title="Ant Script Library v1.0.1" href="http://www.exubero.com/asl/ant-script-library-1.0.1.zip">http://www.exubero.com/asl/ant-script-library-1.0.1.zip</a></p>
<p>I&#8217;m getting around to writing more complete documentation for how to use these, but for the moment I wanted to explain the considerations behind design of these scripts (referred to as the ASL in the remainder of this post).</p>
<h2>Orthogonal Modules</h2>
<p>The <acronym title="Ant Script Library">ASL</acronym> is composed of a number of files, each containing a relatively small number of targets. The targets are named in relatively generic terms. The purpose is to allow alternate scripts to be imported if a different implementation is required. For example, if you like to use <a href="http://ant.apache.org/ivy/">Apache Ivy</a> to manage your dependencies in a repository, you can import the Ivy targets as follows:</p>
<p><code>&lt;import file="ant-script-library/asl-repo-ivy.xml"/&gt;</code></p>
<p>This import will then make the following targets available in your script: repo-cleancache, repo-report, repo-resolve, repo-retrieve.</p>
<p>If you later decided that you didn&#8217;t want to use Ivy, but rather the <a href="http://maven.apache.org/ant-tasks/index.html">Maven Ant Tasks</a> instead, you could replace the previous import with the following:</p>
<p><code>&lt;import file="ant-script-library/asl-repo-maven.xml"/&gt;</code></p>
<p>With this one change, your build script then changes to use a completely different repository management tool. Because this different module provides targets with the same names, no other changes would be required in the script (though in this case, you would have to replace the ivy.xml file with an equivalent pom.xml).</p>
<h2>Small Targets</h2>
<p>Each <acronym title="Ant Script Library">ASL</acronym> module is composed a number of top level targets public targets (these have descriptions, and so are described when you type `<code>ant -p</code>`), as well as a number of private targets (these are prefixed with a &#8216;-&#8217; to ensure that they can&#8217;t accidentally be invoked from the command line). Looking over the scripts, you will not that no target is more than 5 &#8211; 10 lines long, and does at most one or two tasks. The are a number of reasons for this:</p>
<ul>
<li>It becomes much easier to understand and maintain the scripts, because there is nothing really complex in any one target</li>
<li>It becomes very easy to override specific targets to give different functionality. This is especially important when you are writing library scripts &#8211; it is almost certain that some targets will need to be overridden in the main script.</li>
</ul>
<h2>Convention Over Configuration</h2>
<p>The <acronym title="Ant Script Library">ASL</acronym> has a number of build in configuration defaults, such as the location of the source directory, the location of the test source directory, and so on.  If your application conforms to these expected default, your build script can become incredibly simple. The simplest possible script might be:</p>
<p><code>&lt;project name="my-project" default="dist"&gt;<br />
&lt;import file="ant-script-library/asl-java.xml"/&gt;<br />
&lt;/project&gt;</code></p>
<p>In general, the <acronym title="Ant Script Library">ASL</acronym> scripts tend to expect your project conforms to the Maven <a href="http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html">standard directory layout</a>.</p>
<h2>Configuration Over Overriding</h2>
<p>Not everyone has their project laid out in exactly the way, and it&#8217;s not always easy to change this. In these cases, it&#8217;s usually just a matter of defining specific properties with the actual values for your project before importing the <acronym title="Ant Script Library">ASL</acronym> scripts. For example:</p>
<p><code>&lt;project name="my-project" default="dist"&gt;<br />
&lt;property name="java-build.src-dir location="src"/&gt;<br />
&lt;property name="java-test.src-dir location="test"/&gt;<br />
&lt;import file="ant-script-library/asl-java.xml"/&gt;<br />
&lt;/project&gt;</code></p>
<p>Admittedly,the documentation for the properties is not there right now, but these can easily be determined by inspecting the <acronym title="Ant Script Library">ASL</acronym> scripts.</p>
<h2>Overriding Over Reimplementation</h2>
<p>In cases where you need to do something complete different to what the <acronym title="Ant Script Library">ASL</acronym> scripts are doing, you can override specific targets in the top level build script. Just those targets will be overriden, and everything will work without change. For example:</p>
<p><code>&lt;project name="my-project" default="dist"&gt;<br />
&lt;import file="ant-script-library/asl-java.xml"/&gt;<br />
&lt;!-- ***********************************************************************<br />
* target override: copy-resources<br />
************************************************************************ --&gt;<br />
&lt;target name="copy-resources"<br />
description="Copies resources in preparation to be packaged in jar"&gt;<br />
&lt;copy todir="${java-build.classes-dir}"&gt;<br />
&lt;fileset dir="resources"/&gt;<br />
&lt;/copy&gt;<br />
&lt;/target&gt;<br />
&lt;/project&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/01/design-principles-for-the-ant-script-library/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ant Script Library</title>
		<link>http://www.exubero.com/joe/2009/01/ant-script-library/</link>
		<comments>http://www.exubero.com/joe/2009/01/ant-script-library/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 02:58:04 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Build Automation]]></category>

		<guid isPermaLink="false">http://www.exubero.com/joe/?p=222</guid>
		<description><![CDATA[I always seem to re-implement the same Ant scripts where ever I go. To try an short-circuit this pointless bit of re-work, I&#8217;ve re-implemented the scripts (again) in my own time, and am packaging them up for generate release under the Apache license, allowing me to properly reuse these scripts. I&#8217;ve uploaded them here:
You use [...]]]></description>
			<content:encoded><![CDATA[<p>I always seem to re-implement the same Ant scripts where ever I go. To try an short-circuit this pointless bit of re-work, I&#8217;ve re-implemented the scripts (again) in my own time, and am packaging them up for generate release under the Apache license, allowing me to properly reuse these scripts. I&#8217;ve uploaded them here:</p>
<p>You use this by unzipping the contents to your workspace, and create your own build.xml file similar to the following:</p>
<p><code> &lt;project name="afp-renderer" default="dist"&gt;<br />
&lt;import file="../ant-script-library/asl-java.xml"/&gt;<br />
&lt;/project&gt;</code></p>
<p>In the coming weeks I&#8217;ll explain more about the design and usage of these scripts, but for the moment you can have a poke about. I&#8217;m interested if anyone has any feedback about these.</p>
<p>You can get hold of the scripts from the <a href="http://www.exubero.com/asl/download.html">download page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exubero.com/joe/2009/01/ant-script-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
