griffon/griffon-gradle-plugin — Issue #2: Couldn't get build script to resolve all libraries - Added repositories and library files.
Author: sixman9
Created: 2011-11-11 00:18:11+00:00
State: open

Hi,
Yep, me again, apologies :-( .

I couldn't get the griffon-gradle-plugin 'build.gradle' script to work 'out of the box', it wouldn't resolve several libraries, namely the Spring libs (beans etc.), AOPAlliance, JUnit and a Gant class (org.codehaus.gant.GantBinding). After a bit of investigation, I added both some in-project (lib folder) libraries and extra maven repositories to the non-build-script repository section, thus:

apply plugin: "griffon"

repositories {
mavenCentral()
mavenRepo name: 'Codehaus', url: 'http://repository.codehaus.org/'

//***'new' repositories (Spring and AOPAlliance)
mavenRepo name: 'SpringSource-release', url: 'http://repository.springsource.com/maven/bundles/release'
mavenRepo name: 'SpringSource-external', url: 'http://repository.springsource.com/maven/bundles/external'
}

The above resolved the Spring and AOPAlliance dependencies. I didn't seem to be able to satisfy the JUnit (3.8.1) dependency via a repository entry, so I copied the jar itself to a 'lib' directory in the base of my new project (this was 'suggested' by the library resolution error information coming out of the Gradle build). I also had to do the same with 'gant_groovy1.8-1.9.6.jar' from my Griffon-0.9.4 installation, to satisfy the build's Gant 'ClassNotFoundException':

├── lib
├── gant_groovy1.8-1.9.6.jar
└── junit-3.8.1.jar

All this was build with my project's own Gradle-wrapper-version of Gradle 1.0-milestone-5 (I'm still on 1.0-milestone-3 system-wide, I'll upgrade, soon).

If anyone would like to see how this all hangs together, please feel free to visit my [template Griffon/Gradle project][1].

Thanks

Rich

[1]: https://github.com/sixman9/GriffonGradleBase