<?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>Mike Desjardins&#039; Series of Tubes &#187; ant</title>
	<atom:link href="http://www.mikedesjardins.net/content/category/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikedesjardins.net/content</link>
	<description>freelance software developer consultant in portland, maine</description>
	<lastBuildDate>Wed, 02 Feb 2011 00:14:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Presentation on Maven</title>
		<link>http://www.mikedesjardins.net/content/2009/02/presentation-on-maven/</link>
		<comments>http://www.mikedesjardins.net/content/2009/02/presentation-on-maven/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 15:38:33 +0000</pubDate>
		<dc:creator>Mike Desjardins</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://mikedesjardins.us/wordpress/?p=223</guid>
		<description><![CDATA[Last night I spoke at TechMaine&#8217;s Java Users Group about Maven.  I&#8217;ve made the slides available on Slideshare, although Slideshare botched some of the formatting a bit.  You will get the proper format if you download it and view it locally. Demystifying Maven View more presentations from mdesjardins. (tags: maven build-tools) Enjoy!  Here is the [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I spoke at TechMaine&#8217;s Java Users Group about Maven.  I&#8217;ve made the slides available on Slideshare, although Slideshare botched some of the formatting a bit.  You will get the proper format if you download it and view it locally.</p>
<div id="__ss_1073225" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Demystifying Maven" href="http://www.slideshare.net/mdesjardins/demystifying-maven?type=powerpoint">Demystifying Maven</a><object width="425" height="355" data="http://static.slideshare.net/swf/ssplayer2.swf?doc=maven-for-maine-jug-090226091601-phpapp02&amp;rel=0&amp;stripped_title=demystifying-maven" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=maven-for-maine-jug-090226091601-phpapp02&amp;rel=0&amp;stripped_title=demystifying-maven" /><param name="allowfullscreen" value="true" /></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/mdesjardins">mdesjardins</a>. (tags: <a style="text-decoration:underline;" href="http://slideshare.net/tag/maven">maven</a> <a style="text-decoration:underline;" href="http://slideshare.net/tag/build-tools">build-tools</a>)</div>
</div>
<p>Enjoy!  Here is the abstract for the presentation if you want to know what it&#8217;s about before diving in:</p>
<p>&#8220;Why do we need another build tool when we already have Ant? By focusing on convention over configuration, Maven allows you to declaratively define how your project is built, which reduces a lot of the procedural code that you&#8217;d need to implement in every build file if you were using Ant. This, along with Maven&#8217;s built-in management of repositories for project dependencies, allows you to streamline your build process. Ultimately Maven can reduce the amount of time that would otherwise be wasted hunting down jar files and fiddling with boilerplate build scripts.</p>
<p><span>This presentation covers Maven&#8217;s core concepts. It introduces the Plugin architecture, and explain how the most popular plugins are used. It also covers the POM concept and how it relates to dependency tracking and repositories.&#8221;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedesjardins.net/content/2009/02/presentation-on-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build Date on a Tapestry 4 login page using Ant</title>
		<link>http://www.mikedesjardins.net/content/2007/12/build-date-on-a-tapestry-4-login-page/</link>
		<comments>http://www.mikedesjardins.net/content/2007/12/build-date-on-a-tapestry-4-login-page/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 16:35:00 +0000</pubDate>
		<dc:creator>Mike Desjardins</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tapestry]]></category>

		<guid isPermaLink="false">http://mikedesjardins.us/wordpress/?p=24</guid>
		<description><![CDATA[Recently, I had to put a build timestamp onto a login page for a web application I&#8217;m developing at work. The web application is written using Tapestry 4.1, but some of the techniques are equally applicable to other frameworks. I thought I&#8217;d share. First, you need to setup your ant task to grab a timestamp, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I had to put a build timestamp onto a login page for a web application I&#8217;m developing at work.  The web application is written using Tapestry 4.1, but some of the techniques are equally applicable to other frameworks.  I thought I&#8217;d share.</p>
<p>First, you need to setup your ant task to grab a timestamp, and put it into your manifest file.  You do so using the tstamp task, like this:<br /><span style="font-size:85%;"> <span style="font-family:courier new;"><br /></span></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.dragonflymarsh.com/blog/uploaded_images/Screenshot-718923.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.dragonflymarsh.com/blog/uploaded_images/Screenshot-718919.png" alt="" border="0" /></a>The tstamp task is taking the current date and time, formatting it as specified by pattern (just as you&#8217;d specify it in a <a href="http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>) and placing it in the <span style="font-weight: bold;">buildtstamp</span> variable.  The manifest task builds a MANIFEST.MF file which ends up in your deployed web application&#8217;s META-INF directory.  You&#8217;ll notice that I&#8217;m also putting the name of the user who built the application into the manifest.</p>
<p>Next, we need to read the Manifest from our application.  The first screen presented by my Tapestry app is LogOn.java.  First, use <a href="http://hivemind.apache.org/">HiveMind</a> to inject the ServletContext into my page:</p>
<p><span style="font-size:85%;"><span style="font-family:courier new;">  @InjectObject(&#8220;service:tapestry.globals.ServletContext&#8221;)</span><br /><span style="font-family:courier new;">  public abstract ServletContext getServletContext();</span><br /></span><br />Also, we need to create an abstract method into which we&#8217;ll store and retrieve the build date:</p>
<p><span style="font-size:85%;"><span style="font-family:courier new;">  public abstract String getBuiltOn();</span><br /><span style="font-family:courier new;">  public abstract void setBuiltOn(String builtOn);</span><br /></span><br />Finally, we need to read the Manifest file in our <span style="font-weight: bold;">pageBeginRender</span> method, and set the &#8220;Built On&#8221; date accordingly.  This is how I did this:
<pre>public void pageBeginRender(PageEvent event) {ServletContext sc = this.getServletContext();String filename = sc.getRealPath("/META-INF/MANIFEST.MF");try {  BufferedInputStream i = new BufferedInputStream(new FileInputStream(filename));  Manifest m = new Manifest(i);  Attributes attrib = m.getMainAttributes();  this.setBuiltOn(attrib.getValue("Build-Date"));} catch (Exception e) {  log.warn("Unable to read MANIFEST.MF");}}</pre>
<p>Finally, we need to actually render this on the LogOn page.  I did this with a simple Insert component directly on the html page:</p>
<p><span style="font-size:85%;"><span style="font-family:courier new;">Built: &lt;span jwcid=&#8221;@Insert&#8221; value=&#8221;ognl:builtOn&#8221;&gt;</span></span></p>
<p>And <span style="font-style: italic;">voila</span>!  You have a build date on your log page, which can come in handy, e.g., when your QA team doesn&#8217;t know which version they&#8217;re testing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedesjardins.net/content/2007/12/build-date-on-a-tapestry-4-login-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

