On Tue, Mar 22, 2011 at 3:10 PM, shadowlaw <[email protected]> wrote:
> hi, > > how can make gradle copy all the dependencies dowloaded from maven > repository into a given folder of my project? and is these jars already > available in the classpath of my application like the maven way? > and how to do it? > "gradle copy dependencies" search on google gives a few examples, like this http://www.mail-archive.com/[email protected]/msg02573.html configurations { xyzJars } dependencies { xyzJars "someGroup:someId:version" xyzJars "someGroup2:someId2:version" } task deployBundles << { copy { from configurations.xyzJars into "somedir" } } These jars are on the classpath, depending on the configuration they are added to. E.g. adding them to the "compile" configuration would add them to the compile classpath and all classpaths that inherit compile (e.g. testCompile, test, etc), but adding the dependencies to a custom configuration would not necessarily add them to the classpath unless you do so manually via sourceSets or a task configuration phase: compileJava { // configure classpath here } If you add dependencies (e.g. for the "compile" configuration) from a maven repo, then they will be added to the the classpath from their location in the gradle cache (~/.gradle/cache/...). Try adding a println of each entry in the classpath for the configuration phase of the compileJava task, it should give you a bit of a insight into the classpath: compileJava { classpath.each { println "Found dependency: $it" } } > thanks > > -- > View this message in context: > http://gradle.1045684.n5.nabble.com/question-about-dependencies-management-tp4256801p4256801.html > Sent from the gradle-user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Brett Cave Systems Architect Jemstep, Inc www.jemstep.com
