From d8eb1171048dedc83cd058fa7f4d9736b06dadda Mon Sep 17 00:00:00 2001 From: filipesoliveira Date: Thu, 20 Aug 2020 16:46:41 +0100 Subject: [PATCH] Fixed an issue caused by the irs-demo project that would prevent builds from succeed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build command that would fail every time: “./gradlew clean build slowIntegrationTest”. Notes: The evaluationDependsOn lines inside the build.gradle file under the irs-demo folder where moved above the dependencies for best practices and to avoid weird errors. The archiveClassifier added to the build.gradle file under irs-demo/web folder is the actual fix. The archive classifier accepts a string that is appended to the jar file. By changing the filename of the jar, Boot Spring is prevented from overwriting the jar and causing build issues. --- samples/irs-demo/build.gradle | 6 +++--- samples/irs-demo/web/build.gradle | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 7628bf32bc..85a55fd6a3 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -50,6 +50,9 @@ repositories { } } +evaluationDependsOn("cordapp") +evaluationDependsOn("web") + dependencies { compile "commons-io:commons-io:$commons_io_version" compile project(":samples:irs-demo:web") @@ -84,9 +87,6 @@ task slowIntegrationTest(type: Test, dependsOn: []) { classpath = sourceSets.slowIntegrationTest.runtimeClasspath } -evaluationDependsOn("cordapp") -evaluationDependsOn("web") - task systemTest(type: Test, dependsOn: ["cordapp:prepareDockerNodes", "web:generateDockerCompose"]) { testClassesDirs = sourceSets.systemTest.output.classesDirs classpath = sourceSets.systemTest.runtimeClasspath diff --git a/samples/irs-demo/web/build.gradle b/samples/irs-demo/web/build.gradle index c7f130691c..8064af4347 100644 --- a/samples/irs-demo/web/build.gradle +++ b/samples/irs-demo/web/build.gradle @@ -92,6 +92,7 @@ dependencies { jar { from sourceSets.main.output dependsOn clientInstall + archiveClassifier = 'thin' } def docker_dir = file("$project.buildDir/docker")