ABK07
ABK07

Reputation: 515

How to use Grails Dependency cache in IDE?

Is there a way to use the ivy cache grails dependency DSL creates within an IDE like eclipse or netbeans? Or must I manually add all dependencies to the IDE lib folder?

I've looked into plugins like ivybeans and ivyde, but they seem to require ivy.xml and ivysettings.xml files, which grails does not produce.

Upvotes: 2

Views: 1627

Answers (3)

mmigdol
mmigdol

Reputation: 2193

I just attached the following to the Jira bug.

In snooping around the STS distribution, I found the following code in C:\springsource\sts-2.3.2.RELEASE\configuration\org.eclipse.osgi\bundles\898\1.cp\src\com\springsource\sts\grails\core\model\GrailsBuildConfig.java

// make sure that we use the Ivy dependency resolution strategy for Grails 1.2 // TODO CD make version number detection more flexible if (settings.getGrailsVersion().startsWith("1.2")) { jarFiles.addAll(settings.getTestDependencies()); jarFiles.addAll(settings.getProvidedDependencies());

Based on this find, I tried downgrading my project from Grails 1.3.2 to Grails 1.2 and ran "refresh dependencies". Sure enough, the dependencies were correctly loaded from Ivy.

Looks like someone needs to do the TODO. I can take a stab at it once I figure out how to check out the source code...

Upvotes: 1

BungleFeet
BungleFeet

Reputation: 1810

The Grails tooling provided by the SpringSource Tool Suite plugin for Eclipse has the functionality you desire. It reads BuildConfig.groovy and modifies the project classpath accordingly.

Upvotes: 1

Stefan Armbruster
Stefan Armbruster

Reputation: 39905

IntelliJ syncs dependencies between Grails (form application.properties and BuildConfig.groovy) and the IDE very nicely.

Upvotes: 0

Related Questions