Skip to content

Instantly share code, notes, and snippets.

@adrianbk
Created September 28, 2015 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianbk/1c5c2a19d7904324569d to your computer and use it in GitHub Desktop.
Save adrianbk/1c5c2a19d7904324569d to your computer and use it in GitHub Desktop.
/*
Standalone example to reproduce: https://issues.gradle.org/browse/GRADLE-3342
Affected versions: 2.5 and above
run with: gradle clean orca:compileJava -i
The following will appear in the logs:
Resource missing. [HTTP GET: https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient//httpclient-.pom]
Resource missing. [HTTP HEAD: https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient//httpclient-.jar]
Resource missing. [HTTP GET: https://oss.sonatype.org/content/repositories/snapshots/org/apache/httpcomponents/httpclient//httpclient-.pom]
Resource missing. [HTTP HEAD: https://oss.sonatype.org/content/repositories/snapshots/org/apache/httpcomponents/httpclient//httpclient-.jar]
*/
apply plugin: 'java'
repositories {
mavenCentral()
}
project('bluewhale') {
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
}
}
project('orca') {
apply plugin: 'java'
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'org.apache.httpcomponents:httpclient'
compile 'org.apache.httpcomponents:httpclient:4.2.2'
}
}
configurations {
all {
resolutionStrategy {
dependencySubstitution {
substitute module("org.slf4j:slf4j-api:1.7.12") with project(':bluewhale')
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment