Compiling JasperReport using Maven


I am moving old project from ant to maven 2. One of the project has jasper reports. Previously the jasper reports were compiled separately using iReport and manually copied into the projects.


To automate the compilation using maven 2. We are using JDK 1.4. and the jasperreports version is 2.0.5.


Normally I just need to set the pom.xml config as follow

The above is working if your JAVA_HOME is set to JDK 1.4.

My case is different. So, I need to make sure the report is compiled using JDK 1.4.

If you are in the same situation, you need jasperreports-maven-plugin version 1.0-beta-3-SNAPSHOT and configure the plugin to use JDK 1.4. And yes, it’s not available in default repository. So, you need to add the codehaus repo.


GrAngular – Grails & AngularJS (with Spring Security covered)

Please check my grangular project in GitHub.

My current implementation requires some modification & update to existing Grails plugins (Spring Security and angular resource).

  • Spring Security plugin. Need the plugin to return 401 instead of redirecting to login form.
  • Angular resource plugin. I want to upgrade the plugin to use the latest angular JS (currently 1.2.0-RC3).

I’ll wait first until I get response for the pull requests before I start sharing more detail in this post.

Autocompletion using AngularJS, TypeAheadJS, Spring MVC, iBatis


As I’ve mentioned in other articles. We have old web application using Struts 1, Spring, and iBatis.

My boss has informally shared his plan to replace the struts with Spring MVC, replace old javascript with angularJS, and some other exciting plans. However, that’s not a top priority.

The existing web user interface is plain JSP with no Ajax whatsoever.

User still need to key in some value like port code, country code, and other domain-related code using normal input without any sort of hints from the system. And they’ve been using this old software for about 5 years! Amazing! The users can use this software without complaint probably because they’ve been working in their vessel terminal for a very long time. They remember all those codes by heart.


We want to gradually provide better UI experience in the newer version of this software. In this article, we’ll focus on providing autocompletion for port code. Continue reading

Functional Testing with Geb (webdriver with steroid) in Java Maven project


My company has existing Java enterprise project.  One of the project is web application developed using old version of Spring, Struts, & iBatis.

My task is to upgrade some of libraries & dependencies, make it works with Microsoft SQL (previously it runs only on top of Oracle DB), and deploy it to Tomcat instead of Oracle Weblogic. Basically, there will be changes but the UI will remain the same. UI will be the last part to upgrade.

Ideally, I can just reuse existing functional testing codes to make sure my modification doesn’t break existing code.

Unfortunately, the previous developer didn’t write a single test code.  So, I’m planning to start covering all the codes with tests, be it unit test, integration, and/or functional tests.


For this article, we’ll focus on writing functional testing code

Continue reading

Grails MyBatis

I’m rewriting one of existing application. It’s a messy Swing application. There’s no clear separation of concern. It makes direct JDBC calls from View , Controller, anywhere. It’s all over the places. WHAT THE FFHHH!!

My plan is as follow:

  • to move those SQLs to a separate application that serve the data via webservice APIs.
  • to replace JDBC call with ORM. I choose iBatis, well.. MyBatis.
  • to use Grails framework

Continue reading

Grails & RESTful API

If you follow Grails development update, the community has put serious effort in bringing REST experience in Grails to next level. Check this JIRA progress.

Now that Grails 2.3.0M2 has been released, I’ve created simple (but not that simple) grails app that expose RESTful API using that new version.

The intention is to develop real application exposing REST APIs that will be consumed by Android application. I’ll share more once I created the android application and done some testings.

to be continued..