hi guys,
i project a classical groovy project structure like this:
myProject
src/main/groovy/
lib
so i want is download my dependencies from maven repositories to the lib
file and make them available in the classpath just like maven, so i've wrote
the following gradle build file
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "commons-io:commons-io:1.4"
classpath "org.codehaus.groovy.modules:groovyws:0.5.2"
classpath "log4j:log4j:1.2.15"
}
}
apply plugin : 'java'
apply plugin : 'groovy'
archivesBaseName= 'webservice'
//permet de specifier le folder ou le jar sera deployer
libsDirName = "../lib"
configurations{
compile{
transitive = true
}
runtime{
extendsFrom compile
}
}
task copyToLib(dependsOn:configurations.default.buildArtifacts ,type: Copy){
into libsDirName
from configurations.compile
}
task listJars << {
configurations.compile.each { File file -> println file.name }
}
dependencies{
// lib = "$projectDir/lib"
// groovy files(fileTree(dir: lib as File, includes: ['*.jar']))
compile : 'org.codehause.groovy:groovyws:0.5.2'
compile : 'log4j:log4j:1.2.15'
}
repositories{
mavenCentral()
flatDir name: 'localRepository', dirs: 'lib'
}
compileJava {
classpath.each {
println "Found dependency: $it"
}
}
it seems that gradle is comiling my project coeectly but i can't see my
dependencies in the lib folder and of corse i cannot do any importe of
classes in groovy files. did i mess up something
--
View this message in context:
http://gradle.1045684.n5.nabble.com/pb-configuraing-gradle-tp4257046p4257046.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