Skip to content

Commit

Permalink
Set metadata sources for Ivy repositories (elastic#41818)
Browse files Browse the repository at this point in the history
We have faked some Ivy repositories on a few artifact locations. Today
when Gradle attempts to resolve these artifacts, it follows its default
strategy to search for Gradle metadata, then Maven POM files, then Ivy
descriptors, and finally will fallback to looking directly for the
artifact. This wastes times on remote network calls that will 404 anyway
since these metadata resources will not exist for these fake Ivy
repositories. This commit overrides the Gradle strategy to look directly
for artifacts.
  • Loading branch information
jasontedor authored May 5, 2019
1 parent ae14b4e commit 4270d9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,19 @@ repositories {
// simpler legacy pattern from JDK 9 to JDK 12 that we are advocating to Oracle to bring back
ivy {
url "https://download.oracle.com"
metadataSources {
artifact()
}
patternLayout {
artifact "java/GA/jdk${jdkMajor}/${jdkBuild}/GPL/openjdk-[revision]_[module]-x64_bin.[ext]"
}
}
// current pattern since 12.0.1
ivy {
url "https://download.oracle.com"
metadataSources {
artifact()
}
patternLayout {
artifact "java/GA/jdk${jdkVersion}/${hash}/${jdkBuild}/GPL/openjdk-[revision]_[module]-x64_bin.[ext]"
}
Expand Down
3 changes: 3 additions & 0 deletions qa/wildfly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ repositories {
// the Wildfly distribution is not available via a repository, so we fake an Ivy repository on top of the download site
ivy {
url "https://download.jboss.org"
metadataSources {
artifact()
}
patternLayout {
artifact 'wildfly/[revision]/[module]-[revision].[ext]'
}
Expand Down

0 comments on commit 4270d9a

Please sign in to comment.