Download Sources for SpringSource Tool Suite and Grails 1.3.7

Grails is a great framework framework that enables rapid development with Java. Like with any framework however, you sometimes get stuck and need to take a look under the covers to solve a problem.

Today I was fighting with mapping a many-to-many relationship (a common occurrence in grails), and needed to figure out exactly why Grails and Hibernate were not doing what I expected.  One of the great things about Java is that nearly the whole stack is open source so you can just step through the code to see what is going on, as long as you can find the code (and navigate through injected dependencies, but that is a different story).

Eclipse Maven plugins provide great tools to ‘Download Sources’ start viewing them immediately when you step into some third party library code.  I am developing a Grails application on SpringSource Tool Suite (STS, v2.8.2 as of this writing), which is becoming the industry standard IDE for Spring and Grails based applications.  Since Grails uses a Maven-like dependency management system, you would expect STS to be able to download sources for for any of the grails dependencies easily, right?

Not quite.

While this is a feature that might work for Grails 2.0, if you’re using Grails 1.3.7 then you will find a plugin named eclipse-scripts that enables you to download sources and then configure your projects so that STS can find the sources.  Here’s what you do:

grails install-plugin eclipse-scripts
grails compile
grails download-sources-and-javadocs
grails sts-link-sources-and-javadocs

Then restart STS and refresh your project.  Now you can navigate into your project’s Grails Dependencies and view their source through STS!

I found the solution here: https://issuetracker.springsource.com/browse/STS-1440?focusedCommentId=36879&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-36879

Credit for creating the eclipse-scripts plugin to Lari Hotari

No Fluff Just Stuff 2011, Madison, WI

I attended the No Fluff Just Stuff conference in Madison, WI this weekend. It was a great chance to learn the newest Java trends and share struggles in programming with people much like myself, even if most of them were cheeseheads. Here are some of my reflections on the state of Java tech post-conference:

-Java 7 is underwhelming, mostly because it will not have closures. It will however introduce enhancements to speed up Groovy, JRuby, and Scala

-If I read between the lines what features are in HTML and any of them are supported by Chrome, then I think that HTML5+Chrome could easily turn into a gaming platform!

-There is no question that Groovy is the “next big thing” for Java. Get on board.

-A java developer could easily add Hadoop to his resume (and dollars to his pocket), by learning Hadoop with Cascading. Hadoop-worthy scale data sets are available for free from amazon: http://aws.amazon.com/publicdatasets/

Grails is really cool. I wish there was a hosting platform available that was anything close to Heroku for Rails. I think it is unlikely that we will hear any good Startup stories with Grails for that reason.