Creates .classpath and .project files for Eclipse/STS integration. Downloads the sources and javadocs for dependencies from public repositories. Links the sources and javadocs to the dependent libraries.example use (Eclipse / Groovy-Eclipse plugin, no STS): grails compile grails download-sources-and-javadocs (run twice in a row) grails download-sources-and-javadocs grails create-eclipse-files sh scripts/create_cpvardirs_unix.sh (unix) or scripts/create_cpvardirs_windows.bat (windows) then import eclipse_workspace_settings.epf Eclipse Preference to your Eclipse Workspaceexample use (STS Grails dependency manager compatible): grails integrate-with --eclipse grails compile grails download-sources-and-javadocs (run twice in a row) grails download-sources-and-javadocs grails sts-link-sources-and-javadocsFor more information: grails help download-sources-and-javadocs grails help create-eclipse-files grails help sts-link-sources-and-javadocs
grails install-plugin eclipse-scripts 1.0.6
You can manually copy or symlink the scripts to GRAILS_HOME/scripts directory if you want global installation.Alternative installation of scripts in unix (not as a plugin):
Global installation (--global) gives an error in Grails 1.2.1 .
cd $GRAILS_HOME/scriptswget https://github.com/lhotari/grails-eclipse-scripts/raw/master/scripts/DownloadSourcesAndJavadocs.groovy wget https://github.com/lhotari/grails-eclipse-scripts/raw/master/scripts/StsLinkSourcesAndJavadocs.groovy
News: Support for STS/GGTS 3.0 is in Github's master branch. Download StsLinkSourcesAndJavadocs.groovy file and place it in GRAILS_HOME/scripts.
New in 1.0.6 version: Support for Grails 2.0.x
Grails 2.x allows downloading dependency sources without this plugin using the commandThis command is currently broken. There is an open jira to fix this problem. http://jira.grails.org/browse/GRAILS-8955grails refresh-dependencies --include-source --include-javadoc test.xml
FeaturesCreates .classpath and .project files for Eclipse integration. Downloads the sources and javadocs for dependencies from public repositories. Links the sources and javadocs to the dependent libraries (navigating/debugging source code is now possible, javadoc tooltips show up for most libraries).The plugin removes user specific information from .classpath and .project files and makes it possible to shared these files in a large team of Grails developers. Eclipse classpath variables and linked resources (=path variables) are used for removing user specific parts. Eclipse project reference/dependency is added to inline-plugins (it's easier to develop a larger Grails project in Eclipse now). The script creates a Eclipse Preference File with proper values so that it can be imported in to Eclipse Workspace.STS isn't required. The settings should be ok in plain Eclipse + Groovy Eclipse plugin.Since 1.0.3 version, a script called "sts-link-sources-and-javadocs" has been added to support STS Grails Dependency Management. This script should be used to link downloaded sources and javadocs to "Grails Dependencies" classpath container in STS. (You have to download sources and javadocs before adding links with the script.)
Quick start (STS 2.5.2)
After running the script refresh your workspace in STS and restart STS.
grails integrate-with --eclipse grails compile grails download-sources-and-javadocs grails sts-link-sources-and-javadocs
Quick start (plain Eclipse / Eclipse + Groovy-Eclipse plugin)
This step is required if there are several developers on your team and you want to share common .project/.classpath files. This will create a script for creating symbolic links / ntfs junctions. There is a limitation in Eclipse that you cannot use classpath or path variables in Javadoc URLs.
grails compile grails download-sources-and-javadocs grails create-eclipse-files
sh scripts/create_cpvardirs_unix.sh (unix) or scripts/create_cpvardirs_windows.bat (windows) grails create-eclipse-files (updates .classpath to use the symbolic links in javadoc urls)
eclipse_workspace_settings.epfEclipse Preference to your Eclipse Workspace (File->Import->General->Preferences->select file->Finish).
For detailed usage
grails help download-sources-and-javadocs grails help create-eclipse-files grails help sts-link-sources-and-javadocs