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:

Credit for creating the eclipse-scripts plugin to Lari Hotari

4 thoughts on “Download Sources for SpringSource Tool Suite and Grails 1.3.7

  1. It’s hard to find your blog in google. I found it on 18 spot,
    you should build quality backlinks , it will
    help you to rank to google top 10. I know how to help you, just search in google – k2 seo tips and tricks

  2. I read a lot of interesting posts here. Probably you spend a lot
    of time writing, i know how to save you a lot of work, there is an online tool that creates readable, SEO
    friendly articles in minutes, just search in google – laranitas free content source

Leave a Reply

Your email address will not be published. Required fields are marked *