Repository for maven-timestamp-plugin added

A while back I released the maven timestamp plugin. While I was not able to convince the gatekeepers of the central repository that it is worthy to add (I mean after all that thing is trivial), some 370+ users have already downloaded and used it.

So, to make things easier I added a maven repository for you maven lovers to enjoy. Have fun.

Whats all the fuss about spring source charging big money?

I know, i know, most bloggers usually make very bad fact checkers, but this is just absurd. The bruhaha around SpringSource’s decision to charge money for their binary (only binary) releases, finally got so big that I decided to call up a sales rep. Reports of astronomical sums, one blogger mentioned 22.000 US$, totally scared me and I wanted to know if that was true.

And sure enough: It’s not.

The salesperson was nice enough to let me know, that for the whole spring software stack and 10 incidents plus some development software, I would have to shell out 630€ – about 900 US$ per year and per CPU. Affected are only production systems, not developer machines. For all she cared I would’ve been able to supply every developer in India with a fresh release, as long as he works for me and doesn’t violate the EULA. Also, cores do not count as additional CPUs.

I don’t know what kind of support Ryan was talking about when he was offered the 22k$ package, but I suppose he wanted Rod Johnson to hold his hand while coding, singing him a lullaby and basically giving him the teet – for that, 22k$ seem pretty reasonable to me ;)

Still, getting a community hooked on an open source product and then charging them for their dependence on said product – after all learning spring is a big investment – smells kinda funny to me. I will have to decide carefully if I really need Spring 3 and all those tools after all.

Maven Timestamp plugin 0.1 released

I just released my first maven plugin. It’s really the simplest possible piece of code you could imagine, but yet it makes it’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 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 filter output back into your pom.xml, or you end up using a plugin that doesn’t have the ability to give you a customized date format (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 :)

Matching XML content with XPath – the magic is in the ‘.’

Sometimes it’s the simple things that make you wonder how they are done on a high level. For example, if you are wondering how you’d match the content of a node in Xpath, you might think to yourself: “Gee I really would like to know which food-nodes in my xml document contain the word ‘Donuts’ – this should be easy to find out with XPath”.

Well, let me save you some time here. At first you might be looking for a function that matches strings. By looking into the w3c xpath function reference you’d find a function called contains(). ‘contains()‘ takes two parameters. And here the fun starts.

What the reference doesn’t tell you (ok I’m sure it does tell you somewhere), 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:

<mydocument>
   <food>Bavarian Donuts</food>
   <food>Cheesecake</food>
   <food>Oranges</food>
</mydocument>

Your first approach might look like this: /mydocument/food[contains(/mydocument/food,'Donuts')] 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’t accept multiple matches as the first parameter.

Instead you can do this: /mydocument/food[contains(.,'Donuts')]

The trick is that you use the '.' which is a shortcut for the current node function to reference the currently matched node as input to your contains() function. That’s all there’s to it.

Deleting packages with Eclipse and Subversion / Subversive plugin

Something I just can’t wrap my head around is the sheer brittleness of development with a Subversion repository. While I do realize that this technology is way younger than the old cvs, it just boggles that mind what kind of crazy bugs you come across.

My pet peeve was this one bug, where you’d delete a package and try to commit and your server tells you that your directory is out of sync. I only now discovered that “out of sync” means you’ll have to “svn update” the parent folder of your deleted packages to be able to commit the delete. See the developer comments on this here – the gist of it: it’s not a bug, it’s a feature. Oh brother.

I guess I’ll have to give mercurial, git or some other versioning system a try in the next project. SVN just makes me want to cry.

Spring 2.5 and the runtime paradigm shift

I just finished reading up on the new features of Spring 2.5 and I have to say I’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.

Continue reading ‘Spring 2.5 and the runtime paradigm shift’

Never mix Spring transactional aop:advice and TransactionProxy

…just don’t do it. I used to work with TransactionProxyFactoryBean quite a lot, back then when Spring 1.x was out and it worked quite nicely – especially when dealing with HibernateInterceptor as a preInterceptor it was quite useful. So imagine my surprise when I tried to mix out the new, shiny Spring 2.0 <aop :advice></aop> anotation based @Transactional support: All session management code stopped working.
Continue reading ‘Never mix Spring transactional aop:advice and TransactionProxy’

Fixing crashy Eclipse installations

I’ve been suffering permanent Eclipse crashes. Especially when developing with the WTP on Tomcat. I found that it just takes some tweakage on the eclipse.ini file to get rid of this noisy little OutOfMemoryException permGen fucker. Here it is, my eclipse.ini. It works like a charm for me.

-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:PermSize=64m
-XX:MaxPermSize=128m

Fixing your Windows MBR after fu**ing it up with ubuntu or grub

I know I sinned. But Bill Gates wrath was mercyless. I screwed up my MBR on my primary harddrive with an ubuntu install and nothing worked anymore. I couldn’t boot either system up because my MBR got overwritten and then something horrible happened.

Well, to make a long story short – the only way I found to make that go away is using the brilliant MBR fix by KÃ¥re Smith which will make your pain (i.e. Grub) disappear in a heartbeat…you just need something to boot your system into DOS mode. Ah well…time to connect that damned old floppy disk drive again *sigh*

3 tools I really dig

Time for a little tool roundup. There are a couple of nice little tools that made my life much easier on the windows platform.

Treesize First I’d like to mention the fabulous TreeSize, which shows you the size of your directories in a Treeview. For fans of the good old Directory Opus which, by the way, has been available for the PC for quite some time now, this is a true godsent.

Then there is the super cool launchy, which basically enables you to access every program and play every media file on your computer lightning fast. Not only that, but it also lets you access websites really quickly. It’s a real producitvity enhancer.

If you don’t own a Mac, but you like the Comic life application that comes with it, you might want to check out the Comic Life for Windows beta. It’s great for creating your own comics (Thanks to Serhat for the link).




Bad Behavior has blocked 1528 access attempts in the last 7 days.

FireStats iconPowered by FireStats