CORDA-1744 - update jolokia to latest version (#3564)

This commit is contained in:
James Brown 2018-07-13 13:33:54 +01:00 committed by Katelyn Baker
parent 3541a00343
commit 2b78b3f724
3 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ buildscript {
ext.jackson_version = '2.9.2'
ext.jetty_version = '9.4.7.v20170914'
ext.jersey_version = '2.25'
ext.jolokia_version = '1.3.7'
ext.jolokia_version = '1.6.0'
ext.assertj_version = '3.8.0'
ext.slf4j_version = '1.7.25'
ext.log4j_version = '2.9.1'

View File

@ -56,7 +56,7 @@ class Cordformation : Plugin<Project> {
Utils.createCompileConfiguration("cordapp", project)
Utils.createRuntimeConfiguration(CORDFORMATION_TYPE, project)
// TODO: improve how we re-use existing declared external variables from root gradle.build
val jolokiaVersion = try { project.rootProject.ext<String>("jolokia_version") } catch (e: Exception) { "1.3.7" }
val jolokiaVersion = try { project.rootProject.ext<String>("jolokia_version") } catch (e: Exception) { "1.6.0" }
project.dependencies.add(CORDFORMATION_TYPE, "org.jolokia:jolokia-jvm:$jolokiaVersion:agent")
}
}

View File

@ -158,13 +158,13 @@ class Node(private val project: Project) : CordformNode() {
*/
private fun installAgentJar() {
// TODO: improve how we re-use existing declared external variables from root gradle.build
val jolokiaVersion = try { project.rootProject.ext<String>("jolokia_version") } catch (e: Exception) { "1.3.7" }
val jolokiaVersion = try { project.rootProject.ext<String>("jolokia_version") } catch (e: Exception) { "1.6.0" }
val agentJar = project.configuration("runtime").files {
(it.group == "org.jolokia") &&
(it.name == "jolokia-jvm") &&
(it.version == jolokiaVersion)
// TODO: revisit when classifier attribute is added. eg && (it.classifier = "agent")
}.first() // should always be the jolokia agent fat jar: eg. jolokia-jvm-1.3.7-agent.jar
}.first() // should always be the jolokia agent fat jar: eg. jolokia-jvm-1.6.0-agent.jar
project.logger.info("Jolokia agent jar: $agentJar")
if (agentJar.isFile) {
val driversDir = File(nodeDir, "drivers")