[BUILD] Change ordering of Java compilation and ML C++ notice extraction

May help to avoid problems with the speed of temporary AWS credentials
propagation (see elastic/x-pack-logstash#73)

Original commit: elastic/x-pack-elasticsearch@c78e00cda5
This commit is contained in:
David Roberts 2017-05-19 13:36:40 +01:00
parent b689159077
commit fa95474ab8
1 changed files with 5 additions and 1 deletions

View File

@ -117,7 +117,7 @@ Closure setAwsCreds = {
break; break;
} catch (AmazonServiceException e) { } catch (AmazonServiceException e) {
if (e.getStatusCode() != 403 || retries == 0) { if (e.getStatusCode() != 403 || retries == 0) {
throw new GradleException('Could not access ml-cpp artifacts. Timed out after 60 attempts', e) throw new GradleException('Could not access ml-cpp artifacts. Timed out after 60 seconds', e)
} }
} }
sleep(500) sleep(500)
@ -279,6 +279,10 @@ forbiddenPatterns {
task extractNativeLicenses(type: Copy) { task extractNativeLicenses(type: Copy) {
into "${buildDir}" into "${buildDir}"
include 'platform/licenses/**' include 'platform/licenses/**'
// This is to reduce the risk of credentials used to access the native bundle not
// having propagated throughout AWS by the time it's downloaded; the time needed
// to compile the Java is extra time during which the propagation can take place
shouldRunAfter compileJava
} }
// TODO: standardize packaging config for plugins // TODO: standardize packaging config for plugins