JRuby rake and maven

I cannot stand Maven. It makes me nauseous. However that does not seem to be the case for other institutionalised developers. Here’s what I did on a project where I wanted to isolate its craziness and still use jruby and rake. namespace :maven do M2_HOME = "binaries/apache-maven-3.0.3" desc "Run the maven package goal" task :package => :clean do mvn "package" end desc "Run the application" task :application => :clean do mvn "test-compile", "exec:java", "-Dexec....

RubyGems in a JAR

On a few projects now I’ve used jruby with rake. I know that I can use rvm and just fetch the gems per project, but for developers stuck on windows that way is a little more than difficult. So here’s how I package up rubygems in a JAR. mkdir gemjar java -jar jruby-complete-1.6.3.jar -S gem install -i ./gemjar haml --version 3.1.2 --no-rdoc --no-ri java -jar jruby-complete-1.6.3.jar -S gem install -i ....

JRuby Rake and Ivy

Here’s a neat way of using ivy with jruby, rake & ant. task :ivy_retrieve do ant.taskdef :resource => "org/apache/ivy/ant/antlib.xml" do classpath :location => "ivy/ivy-2.2.0.jar" end ant.configure :file => "ivy/ivysettings.xml" ant.resolve :file => "ivy/ivy.xml" ant.retrieve :pattern => "lib/[conf]/[type]/[artifact]-[revision].[ext]", :sync => "true" puts end Still using ant, still angle bracket free (except for ivy, sigh). Read my previous post if you want to know more about jruby, rake and ant....

Zero-downtime deployments

For some time now I’ve been thinking about all the different approaches that I have seen and heard with the goal of zero-downtime deployment for a horizontally-scaled application that relies on a database or some form of persistent storage. On most of the projects that I have worked on this was not a requirement, although a speedy and automated deployment was preferred. However, other projects were for websites and applications that formed the backbone of a 24/7 company and as such the idea of even a couple of minutes downtime was unacceptable....

Spring-StringTemplate is now in Maven Central

For Ivy: <dependency org="com.tomczarniecki" name="spring-stringtemplate" rev="1.5.1" /> For Maven (yeech): <dependency> <groupId>com.tomczarniecki</groupId> <artifactId>spring-stringtemplate</artifactId> <version>1.5.1</version> </dependency> Thank you Sonatype....

S3DropBox is now on GitHub

I've released a new version of my S3DropBox on GitHub. I've moved the project to GitHub so that I can have all my current active projects in one place. Check it out in its new home at https://github.com/tomcz/s3dropbox. This release uses the AWS java libraries. They are finally good enough for me to stop creating my own wheels and vulcanising my own rubber. As a bonus the S3DropBox creates URLs in virtual hosted format (eg....

JRuby Rake Vs Ant

For the longest time I’ve been writing Java build files in XML and I’ve always felt a little dirty. Not too long ago I was re-introduced to rake by a colleague (thanks Fabio) and how nicely it integrates with ant. This means that you can now turn this: <project name="spring-conversations" default="build" basedir="."> <property name="src.dir" location="src/main" /> <property name="test.dir" location="src/test" /> <property name="build.dir" location="build" /> <property name="dist.dir" location="${build.dir}/dist" /> <property name="report.dir" location="${build....

Conversations with Spring

Not that long ago I gave a ThoughtWorks geek night presentation on Post-Redirect-Get and how to mess with the Spring Framework to make it happen. I've put up the presentation and the code that I used for it on GitHub. Feedback is always welcome....

Caffeine

Caffeine is my shepherd; I shall not doze. It maketh me to wake in green pastures; It leadeth me beyond the sleeping masses. It restoreth my buzz; It leadeth me in the paths of consciousness for its name's sake. Yea, though I walk through the valley of the shadow of addiction, I will fear no Equal™; For thou art with me; thy cream and thy sugar they comfort me. Thou preparest a carafe before me in the presence of The Starbucks;...

Update to S3DropBox

Another update to my S3DropBox. Due to popular demand (ahem) I've added a progress bar to track uploads and downloads. You now have something pretty to watch rather than a screenful of dots. Any other requests?...