Fix quasar path for run-time agent instrumentation.

This commit is contained in:
josecoll 2019-05-20 11:38:56 +01:00
parent 84ca6405c2
commit 2595dacd7e

View File

@ -142,7 +142,7 @@ class DriverDSLImpl(
return try { return try {
val type = Class.forName(className) val type = Class.forName(className)
val src = type.protectionDomain.codeSource val src = type.protectionDomain.codeSource
return src.location.toString() return src.location.toPath().toString()
} catch (e: Exception) { } catch (e: Exception) {
log.warn("Unable to locate JAR for class given by `$className` on classpath: ${e.message}", e) log.warn("Unable to locate JAR for class given by `$className` on classpath: ${e.message}", e)
throw e throw e
@ -549,6 +549,7 @@ class DriverDSLImpl(
*extraCmdLineFlag *extraCmdLineFlag
) )
System.exit(-1)
return poll(executorService, "$extraCmdLineFlag (${config.corda.myLegalName})") { return poll(executorService, "$extraCmdLineFlag (${config.corda.myLegalName})") {
if (process.isAlive) null else Unit if (process.isAlive) null else Unit
} }
@ -757,7 +758,7 @@ class DriverDSLImpl(
"org.hamcrest**;org.hibernate**;org.jboss**;org.jcp**;org.joda**;org.junit**;org.mockito**;org.objectweb**;" + "org.hamcrest**;org.hibernate**;org.jboss**;org.jcp**;org.joda**;org.junit**;org.mockito**;org.objectweb**;" +
"org.objenesis**;org.slf4j**;org.w3c**;org.xml**;org.yaml**;reflectasm**;rx**;org.jolokia**;" + "org.objenesis**;org.slf4j**;org.w3c**;org.xml**;org.yaml**;reflectasm**;rx**;org.jolokia**;" +
"com.lmax**;picocli**;liquibase**;com.github.benmanes**;org.json**;org.postgresql**;nonapi.io.github.classgraph**;)" "com.lmax**;picocli**;liquibase**;com.github.benmanes**;org.json**;org.postgresql**;nonapi.io.github.classgraph**;)"
val extraJvmArguments = systemProperties.removeResolvedClasspath().map { "-D${it.key}=${it.value}" } + val extraJvmArguments = systemProperties.removeResolvedClasspath().map { "-D${it.key}=${it.value}" } //+
"-javaagent:$quasarJarPath=$excludePattern" "-javaagent:$quasarJarPath=$excludePattern"
val loggingLevel = if (debugPort == null) "INFO" else "DEBUG" val loggingLevel = if (debugPort == null) "INFO" else "DEBUG"