summaryrefslogtreecommitdiffstats
path: root/common/minimal-distribution-parent
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-09-05 15:35:46 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-06 06:05:50 +0000
commit32969dd02d86a78d9fd8847229d929ae17fede34 (patch)
tree4f25cab4d61fcf8572e5c9c979edd96ac8c25295 /common/minimal-distribution-parent
parent3196c5888d01a41aaa9cba115a4e92572e8890ae (diff)
HONEYCOMB-157: add debug script
Change-Id: I2f65514f7c2adfeb2714584588a262f2e44f70f6 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'common/minimal-distribution-parent')
-rw-r--r--common/minimal-distribution-parent/pom.xml16
1 files changed, 12 insertions, 4 deletions
diff --git a/common/minimal-distribution-parent/pom.xml b/common/minimal-distribution-parent/pom.xml
index aa18442d9..e35ab6fdb 100644
--- a/common/minimal-distribution-parent/pom.xml
+++ b/common/minimal-distribution-parent/pom.xml
@@ -22,7 +22,7 @@
<!--<main.class>Main</main.class>-->
<exec.parameters>-Xms32m -Xmx128m -XX:MetaspaceSize=32m -XX:MaxMetaspaceSize=128m</exec.parameters>
<exec.parameters.minimal>-client -Xms20m -Xmx32m -XX:MetaspaceSize=5m -XX:MaxMetaspaceSize=32m -XX:MaxMetaspaceExpansion=1m -Xss512k -XX:+UseSerialGC -Djava.compiler=NONE -Xverify:none -noverify</exec.parameters.minimal>
-
+ <debug.parameters>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</debug.parameters>
<guice.version>4.1.0</guice.version>
<guice.config.version>1.2.0</guice.config.version>
<restconf.version>1.3.2-Beryllium-SR2</restconf.version>
@@ -149,13 +149,13 @@
log.info "Generating shell exec script"
def args = properties.getOrDefault("exec.parameters", "")
log.debug "Additional shell exec script properties: ${args}"
- def scriptContent = "java ${args} -jar \$(dirname \$0)/${project.artifactId}-${project.version}.jar"
- log.info "Generating shell exec script as ${scriptContent}"
+ def javaArgs = "${args} -jar \$(dirname \$0)/${project.artifactId}-${project.version}.jar"
def scriptParent = Paths.get(project.build.outputDirectory, "honeycomb-minimal-resources")
scriptParent.toFile().mkdirs()
+ def scriptContent = "#!/bin/sh -\njava " + javaArgs
+ log.info "Generating shell exec script as ${scriptContent}"
def scriptPath = Paths.get(scriptParent.toString(), "honeycomb")
log.info "Writing shell exec script to ${scriptPath}"
- scriptContent = "#!/bin/sh -\n" + scriptContent
scriptPath.toFile().text = scriptContent
scriptPath.toFile().setExecutable(true)
@@ -163,6 +163,14 @@
log.info "Writing shell exec script to ${scriptPath}"
scriptPath.toFile().text = scriptContent + " &amp;"
scriptPath.toFile().setExecutable(true)
+
+ def debug_args = properties.getOrDefault("debug.parameters", "")
+ def debugScriptContent = "#!/bin/sh -\njava" + " ${debug_args} " + javaArgs
+ log.info "Generating shell debug script as ${debugScriptContent}"
+ scriptPath = Paths.get(scriptParent.toString(), "honeycomb-debug")
+ log.info "Writing shell debug script to ${scriptPath}"
+ scriptPath.toFile().text = debugScriptContent
+ scriptPath.toFile().setExecutable(true)
</source>
</configuration>
</execution>