<?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>keyboardsamurais.de &#187; java</title>
	<atom:link href="http://keyboardsamurais.de/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://keyboardsamurais.de</link>
	<description>thoughts on software development, warts and all...</description>
	<lastBuildDate>Wed, 17 Feb 2010 23:20:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Maven Timestamp plugin 0.1 released</title>
		<link>http://keyboardsamurais.de/2008/06/08/maven-timestamp-plugin-01-released/</link>
		<comments>http://keyboardsamurais.de/2008/06/08/maven-timestamp-plugin-01-released/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 13:27:29 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/?p=224</guid>
		<description><![CDATA[I just released my first maven plugin. It&#8217;s really the simplest possible piece of code you could imagine, but yet it makes it&#8217;s goal (addings a timestamp variable to your build process) a piece of cake. You can find it at http://code.google.com/p/maven-timestamp-plugin/ along with a bugtracker and some docs.
Now, why would I write something as [...]]]></description>
			<content:encoded><![CDATA[<p>I just released my first maven plugin. It&#8217;s really the simplest possible piece of code you could imagine, but yet it makes it&#8217;s goal (addings a timestamp variable to your build process) a piece of cake. You can find it at <a href="http://code.google.com/p/maven-timestamp-plugin/">http://code.google.com/p/maven-timestamp-plugin/</a> along with a bugtracker and some docs.</p>
<p>Now, why would I write something as simple as a timestamp plugin? Well, I am the first to admit that adding timestamp in your build process is not exactly rocket science. But unfortunately most of the procedures to do just that made it seem more complicated than it should be. Either you jump through hoops trying to get a <a href="http://www.gadberry.com/aaron/2007/05/28/inject-build-time-timestamp-property-using-maven/">filter output back into your pom.xml</a>, or you end up using a <a href="http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/index.html">plugin that doesn&#8217;t have the ability to give you a customized date format</a> (who the hell knows at first sight that the timestamp 1212931073482 means 8th june 2008 15:18h?!). So out of this frustration, the timestamp plugin was born. Have fun with it folks <img src='http://keyboardsamurais.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2008/06/08/maven-timestamp-plugin-01-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Matching XML content with XPath &#8211; the magic is in the &#8216;.&#8217;</title>
		<link>http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/</link>
		<comments>http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 15:03:54 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[contains]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[matching]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/</guid>
		<description><![CDATA[Sometimes it&#8217;s the simple things that make you wonder how they are done on a high level. For example, if you are wondering how you&#8217;d match the content of a node in Xpath, you might think to yourself: &#8220;Gee I really would like to know which food-nodes in my xml document contain the word &#8216;Donuts&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s the simple things that make you wonder how they are done on a high level. For example, if you are wondering how you&#8217;d match the content of a node in Xpath, you might think to yourself: &#8220;Gee I really would like to know which food-nodes in my xml document contain the word &#8216;Donuts&#8217; &#8211; this should be easy to find out with XPath&#8221;.</p>
<p>Well, let me save you some time here. At first you might be looking for a function that matches strings. By looking into the <a href="http://www.w3.org/TR/xpath-functions/">w3c xpath function reference</a> you&#8217;d find a function called <code><a href="http://www.w3.org/TR/xpath-functions/#func-contains">contains()</a></code>. &#8216;<code>contains()</code>&#8216; takes two parameters. And here the fun starts. </p>
<p>What the reference doesn&#8217;t tell you (ok I&#8217;m sure it does tell you <em>somewhere</em>), is how to fiddle your matches into the first contains() parameter, which incidentally is the text you want to scan. If your document looks something like this:</p>
<pre>
&lt;mydocument&gt;
   &lt;food&gt;Bavarian Donuts&lt;/food&gt;
   &lt;food&gt;Cheesecake&lt;/food&gt;
   &lt;food&gt;Oranges&lt;/food&gt;
&lt;/mydocument&gt;
</pre>
<p>Your first approach might look like this: <code>/mydocument/food[contains(/mydocument/food,'Donuts')]</code> Which, in a universe where everything makes perfect sense, would yield you one hit. However, this one just breaks your XPath processor, because contains() doesn&#8217;t accept multiple matches as the first parameter.</p>
<p>Instead you can do this: <code>/mydocument/food[contains(.,'Donuts')]</code></p>
<p>The trick is that you use the <code>'.'</code> which is a shortcut for the current node function to reference the currently matched node as input to your <code>contains()</code> function. That&#8217;s all there&#8217;s to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring 2.5 and the runtime paradigm shift</title>
		<link>http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/</link>
		<comments>http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 01:32:09 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/</guid>
		<description><![CDATA[I just finished reading up on the new features of Spring 2.5 and I have to say I&#8217;m pretty excited. One thing that bothered me from the start of the Spring project has always been the need for xml wiring of components. No matter what you do in Spring land, you will have to create [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished reading up on the new features of Spring 2.5 and I have to say I&#8217;m pretty excited. One thing that bothered me from the start of the Spring project has always been the need for xml wiring of components. No matter what you do in Spring land, you will have to create at least a minimal stub of xml in your config files to make your component known to Spring. And now, the freshly released 2.5 version of Spring is reaping the benefits of annotation driven development and completely does away with that. </p>
<p><span id="more-220"></span><br />
Sure, you can still wire your static beans if you want to, but much more excitingly you can use <a href="http://blog.interface21.com/main/2007/05/29/customizing-annotation-configuration-and-component-detection-in-spring-21/">component scanning </a>to look for beans at runtime. No fiddling with XML at all. </p>
<p>Mark Fisher does a very good job of explaining the full impact of this in <a href="http://www.infoq.com/articles/spring-2.5-part-1">his InfoQ article on Spring 2.5</a>. Also there is the much more comprehensive <a href="http://www.theserverside.com/tt/articles/content/IntrotoSpring25/article.html">Introduction to 2.5 by Rod Johnson on TSS.com</a>.</p>
<p>But what really caught my interest was Interface 21 CTO <a href="http://www.infoq.com/interviews/osgi-adrian-colyer">Adrian Colyer&#8217;s elaboration</a> on Spring&#8217;s investment into the <a href="http://www.osgi.org/">OSGi</a> spec. If you listen to him you suddenly realize why exactly the runtime wiring became necessary. The upcoming <a href="http://www.springframework.org/osgi">Spring OSGi API</a> takes the fact into account that Spring configuration at runtime is cool and all, but modularity gets ever more important. Coyler talks about all the interest the application server vendors have in OSGi and how big Web application projects may look like in the future.</p>
<p>In large applications we may see lots of dynamic service OSGi modules, wired together at runtime by Spring, that, as a whole, make up one or more applications. Spring takes into account that OSGi services may come and go at any given moment. Thus updating parts of the application (deploying a new service) instead of changing out a monolithic WAR file becomes a possibility. Exciting stuff. I will look into that some more.</p>
<p>Of course there is plenty of other cool stuff in 2.5, just check out the <a href="http://blog.interface21.com">SpringSource blog</a> or read the <a href="http://static.springframework.org/spring/docs/2.5.x/changelog.txt">Changelog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
