I’m trying to use Gradle to download a war file from nexus to run in a Tomcat instance, however whilst I should be able to download a war without retrieving all the metadata etc using “artifact only notation” according to the Gradle bug tracker this feature has been broken for a number of years (https://issues.gradle.org/browse/GRADLE-2590). Does anyone know of a good workaround for this issue?
Although I like the idea of using Gradle for everything, perhaps pragmatism could lead you to just use “wget” or “curl”, even within a Gradle task?
So the issue you have is that gradle downloads the metadata too or that transitive dependencies are resolved too?
you can disable the transitive dependency download by:
configurations {
dependencies
}
dependencies {
download ("com.google.gerrit:gerrit-war:2.10.3.1@war"){
transitive = false
}
}
So I tried specifying transitive=false as you suggest however gradle still seems to be traversing the POM hierarchy even if it’s not downloading the associated artifacts. This is causing me an issue as some of the artifacts that are depended upon are not present in this particular repo, which is making gradle fail out even when I only want to download the war file without dependencies.