Home > grails, plugins > Grails Quickie: How to Load Dependency Sources and Javadocs

Grails Quickie: How to Load Dependency Sources and Javadocs

Once you start a new Grails project and you want to access all the source code of dependent libraries, you have to manually reference the according source files. This is a boring, time-consuming and error-prone task – something like mvn dependency:sources is definitely missing. Luckily, there exists a workaround which can be done using the eclipse-scripts [0] plugin:

grails install-plugin eclipse-scripts 
grails compile 
grails download-sources-and-javadocs 
# run twice to download everything 
grails download-sources-and-javadocs 
# grails create-eclipse-files # run this one to create .classpath/.project Eclipse/STS files

Executing download-sources-and-javadocs loads the docs and copies them into the Ivy cache directory.

Thanks to Lari Hotari who came up with this solution on the Grails mailing-list [1].

[0] Eclipse Helper Scripts Plugin
[1] Nabble Grails User Mailing-List – Grails Dependency Sources

Advertisements
Categories: grails, plugins

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: