OMG, I actually figured one out on my own! Yaay :) So actually, the issue was my misunderstanding of the dependency configurations. What I need is a configuration that is used for compilation, but that is not transitive (similar to provided or optional in Maven).
I had put them in runtime because in reading http://www.gradle.org/0.8/docs/userguide/userguide_single.html#sec:java_plugin_and_dependency_management (specifically Table 18.5) I initially thought that runtime did just that. Re-reading it I misunderstood. So instead of: dependencies { ... runtime { 'javassist:javassist:3.9.0.GA', 'cglib:cglib:2.2', ... } } I did: configurations { provided { description = 'Non-transitive compile classpath elements' transitive = false } } dependencies { ... provided { 'javassist:javassist:3.9.0.GA', 'cglib:cglib:2.2', ... } } sourceSets { main { compileClasspath = configurations.compile + configurations.provided } } On Fri, 2009-10-09 at 20:57 -0500, Steve Ebersole wrote: > I am having no luck defining secondary Maven repositories. Most JBoss > projects for example will need to simultaneously access the Maven > central repository as well as the JBoss repository. So I tried the > following: > subprojects { > ... > repositories { > mavenCentral() > mavenRepo urls: "http://repository.jboss.com/maven2" > } > ... > } > > I have also tried: > subprojects { > ... > repositories { > mavenRepo urls: "http://localhost:8081/artifactory/repo/" > } > .. > } > where that URL is a local instance of artifactory I run on my machine. > > I have tried a few other variations as well. Yet no matter what, my > compilations end up failing because of not being able to find classes > which should be in jars coming from this JBoss repository. Heck, the > artifacts should already be in my local Maven repository > (~/.m2/repository), though was not sure how/if Gradle interacted with > that. > > So am I doing something wrong here? I thought I was following > http://www.gradle.org/0.8/docs/userguide/userguide_single.html#sec:repositories > pretty closely. > -- Steve Ebersole <[email protected]> Hibernate.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
