I have an existing Ant build.xml, which originally just assumed that its dependencies were stored in a “lib” subdir. I tried adding Ivy to this mix, so that one task downloads all the required artifacts either from MavenCentral or a local intranet repo (nexus). Some of the artifacts on that Nexus repo and release artifacts, but one is a snapshot artifact, and the files stored on the repo are timestamped (timestamp is in the file name). This artifact is built by Maven.
I’m trying to write a corresponding Gradle build script, although only the portions that specify and install dependencies. I’ve only just started to read the Gradle docs.
Here is what I have for my build script so far (with some values elided):
------------------------ apply plugin:‘java’
repositories {
maven {
url “~/.m2/repository”
}
maven {
url “http:///nexus/content/repositories/cditspoc-snapshots”
}
maven {
url “http:///nexus/content/repositories/cditspoc-3rd-party”
}
mavenCentral() }
dependencies {
compile “:poc-domain-model:0.0.1-SNAPSHOT” } ---------------------
I tried to just run “gradle dependencies”, and it said the following: ---------------- :dependencies
------------------------------------------------------------ Root project ------------------------------------------------------------
archives - Configuration for archive artifacts. No dependencies
compile - Compile classpath for source set ‘main’. — :poc-domain-model:0.0.1-SNAPSHOT FAILED
default - Configuration for default artifacts. — :poc-domain-model:0.0.1-SNAPSHOT FAILED
runtime - Runtime classpath for source set ‘main’. — :poc-domain-model:0.0.1-SNAPSHOT FAILED
testCompile - Compile classpath for source set ‘test’. — :poc-domain-model:0.0.1-SNAPSHOT FAILED
testRuntime - Runtime classpath for source set ‘test’. — :poc-domain-model:0.0.1-SNAPSHOT FAILED
BUILD SUCCESSFUL
Total time: 51.907 secs ------------------------------
This sounds like it was unable to find the artifact on the repo.