summaryrefslogtreecommitdiffstats
path: root/common/minimal-distribution-parent/pom.xml
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:06 +0000
commitd4219420d9f88498b817dcaf0045a6c3afcebdff (patch)
tree31020406bfea7dc044fe846d2e1bcd811b133ec1 /common/minimal-distribution-parent/pom.xml
parent29e848b9868eedc2bc241247128cb2d8ed0aa006 (diff)
HONEYCOMB-157: add debug script
Change-Id: I2f65514f7c2adfeb2714584588a262f2e44f70f6 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'common/minimal-distribution-parent/pom.xml')
-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 e8f57e6ee..e69b1c8f1 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>