Test your applications against the nightly builds of Grails

One of the cool things the team at Sky used to do was to test the codebase against the latest nightly build of Grails.

This allowed us to quickly catch regressions or incompatibilities as soon as they were checked into Grails. 

Here is a bash script that you can add to Jenkins to do so for Grails 2.3.x 

#download grails nightly
curl -O http://hudson.grails.org/job/grails_core_2.3.x/lastSuccessfulBuild/artifact/build/distributions/${GRAILS_NIGHTLY}.zip

#install jar files into local maven repository
for f in *BUILD-SNAPSHOT.pom; 
   mvn install:install-file -Dfile=${f/.pom/.jar} -DpomFile=$f 
cd ../../

#set environment variables
export PATH="$PATH:$GRAILS_HOME/bin"

#test grails app
grails upgrade --non-interactive
grails test-app --non-interactive

Set it to run once and day and you can guarantee that your code is compatible with changes that are happening within Grails.

Caution: Your project needs to be compatible with at least Grails 2.3.0 for this script to work as the versioning for the Tomcat and Hibernate plugins have changed from previous versions.

Yeoman Generator for Spring Boot update 0.1.1

I’ve updated the yeoman generator for Spring Boot thanks to the London Hackergarten tonight at Skills Matter.

The new version adds two more sub generators that you can use for your project.

You can already generate a RESTful web service endpoint by calling yo spring:rest

Now, you can generate a Hypermedia Driven ( hateoas ) service endpoint via yo spring:hateoas

If you want a more traditional web content via Spring MVC, we also added a sub generator for it. Just call yo spring:route.

(We borrowed angular’s route generator because calling it web seemed kinda weird).

You can update to 0.1.1 version of the package via npm update -g generator-spring

A Spring Boot Generator for Yeoman

I am currently playing around a bit with Spring Boot.

It’s quite a neat project, but I found that having to set up the projects involved a bit of copy and paste from the Spring.io guide pages. Wouldn’t it be great if you had an easier tool to deal with project templating and generation?

As an avid user of the Yeoman generator for my Angular projects, I decided to write a small Spring Boot generator that will include the correct starters and help me scaffold my services. At the end, it ended up being very close to the scaffolding functionality available to other tools like Grails and Play.

Video Demo

Here is a 2 minute video I put together showing the tool in action:

Continue reading

Testing Spring Boot Applications with Spock

I am starting to get familiar with Spring Boot thanks to the Guides on Spring.io and the samples that come with the project itself.

As a Grails developer, I love the Spock testing framework. Spock is a testing and specification framework that fully leverages groovy to help you write succinct and highly expressive tests. You can read more about Spock in the Framework documentation.

In this post, I want to show how you can use Spock to add easily readable tests for your Spring Boot applications.

Continue reading

Building Internal Enterprise Clouds with Cloud Foundry – Panel Discussion Summary from PlatformCF

I am at the SpringOne2GX conference in California.

Earlier today, I had a chance to attend the second day of the Platform CF conference that was available to attendees.

There was a panel around building internal enterprise clouds with Cloud Foundry with GE, Intel and Warner Music. It was very interesting to me and I thought I would share some notes from this panel discussion.

The panel was composed of:

  • Chetan Gadgil, GE Software & Analytics
  • Dave McCrory, Warner Music Group
  • Catherine Spence, Intel

Here are some interesting ideas from the discussion.

Continue reading

First London Hackergarten Meetup Summary

We had the first London Hackergarten meeting on Thursday September 5th at the Skills Matter Exchange.

A Hackergarten is a space where we can get together and contribute a small change to an open source project. The intent of the Hackergarten is to end each meeting with a patch or similar contribution submitted to an open and public project.

The event was sponsored by Sky, who kindly provided the room, beers, pizza and more beer.
Continue reading