Download binary archive from repository


(Pablo Ojeda) #1

I’m trying to download the war from nexus to deploy into Jboss. I’m using this code

repositories {
maven {
url urlNexus
}
}

configurations{
warFile
}
dependencies {
warFile ("$project.group:$project.name:$project.version")
}
task downloadBinaryArchive(type: Copy) {
from configurations.warFile
into “$buildDir/download”
}

After run ./gradlew downloadBinaryArchive, the dependecies of the module are saved into download folder instead of the war file. If I used the name of another artifact(other module into my project) like warFile ("$project.group:module-2:$project.version"), the war file is correctly downloaded from nexus.

I can figure out what is the problem with this