io.fd.honeycomb.common impl-parent 1.16.12-SNAPSHOT ../impl-parent 4.0.0 minimal-distribution-parent ${project.artifactId} 1.16.12-SNAPSHOT pom #!/bin/sh - STATUS=100 while [ $STATUS -eq 100 ] do %s STATUS=$? echo "Honeycomb exited with status: $STATUS" if [ $STATUS -eq 100 ] then echo "Restarting..." fi done -Xms32m -Xmx128m -XX:MetaspaceSize=32m -XX:MaxMetaspaceSize=128m -client -Xms20m -Xmx32m -XX:MetaspaceSize=5m -XX:MaxMetaspaceSize=32m -XX:MaxMetaspaceExpansion=1m -Xss512k -XX:+UseSerialGC -Djava.compiler=NONE -Xverify:none -noverify -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 1.19.1 9.3.11.v20160721 3.1.0 5.0.0 /dev/./urandom // This distribution does not define any own modules. // In order to do so either distribution.modules property must be defined in distribution pom.xml, // containing list of desired modules to start, or this file can be directly edited with same effect. // // Note : Modules should be referenced by full class name, for ex.: io.fd.test.SampleModule, and separated with comma. org.eclipse.jetty jetty-server ${jetty.version} javax.servlet javax.servlet-api ${servlet.version} org.eclipse.jetty jetty-webapp ${jetty.version} org.eclipse.jetty jetty-servlets ${jetty.version} com.sun.jersey jersey-server ${jersey.version} com.sun.jersey jersey-core ${jersey.version} com.sun.jersey jersey-servlet ${jersey.version} org.osgi org.osgi.core ${osgi.core.version} org.apache.maven.plugins maven-jar-plugin 2.6 ${main.class} true lib/ false true config/ cert/ modules/ org.apache.maven.plugins maven-dependency-plugin 2.10 copy-dependencies package copy-dependencies ${project.build.directory}/lib true true yang-jmx-generator unpack-configuration prepare-package unpack-dependencies **/honeycomb-minimal-resources/ ${project.build.outputDirectory}/ org.codehaus.gmaven groovy-maven-plugin start-scripts-generation package execute import java.nio.file.Paths log.info "Generating shell exec script" def scriptTemplate = properties.getOrDefault("start.script.template", "") def args = properties.getOrDefault("exec.parameters", "") log.debug "Additional shell exec script properties: ${args}" 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 = "java " + javaArgs log.info "Generating shell exec script as ${scriptContent}" def scriptPath = Paths.get(scriptParent.toString(), "honeycomb") log.info "Writing shell exec script to ${scriptPath}" scriptPath.toFile().text = String.format(scriptTemplate, scriptContent) scriptPath.toFile().setExecutable(true) scriptPath = Paths.get(scriptParent.toString(), "honeycomb-start") log.info "Writing shell exec script to ${scriptPath}" scriptPath.toFile().text = "\$(dirname \$0)/honeycomb &" scriptPath.toFile().setExecutable(true) def debug_args = properties.getOrDefault("debug.parameters", "") def debugScriptContent = "java" + " ${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 = String.format(scriptTemplate, debugScriptContent) scriptPath.toFile().setExecutable(true) distribution-module-assembly prepare-package execute import java.nio.file.Paths import java.nio.file.Files // module configuration file extraction // builds project name from group,artifact and version to prevent overwriting // while building multiple distribution project def artifact = project.getArtifact() def projectName = "${artifact.getGroupId()}_${artifact.getArtifactId()}_${artifact.getVersion()}".replace(".","-") log.info "Generating list of modules started by distribution ${projectName}" def activeModules = properties.getProperty("distribution.modules", "") .tokenize(",") .collect { module -> module.trim() } log.info "Project ${projectName} : Found modules ${activeModules}" //creates folder modules def outputPath = Paths.get(project.build.outputDirectory, "honeycomb-minimal-resources", "modules") //creates module folder outputPath.toFile().mkdirs() def outputFile = Paths.get(outputPath.toString(), "${projectName}_module-config.txt").toFile() outputFile.createNewFile(); log.info("Writing module configuration for distribution ${projectName} to ${outputPath}") if (activeModules.isEmpty()) { outputFile.text = properties.getProperty("no.modules.defined.message") } else { outputFile.text = activeModules.join(System.lineSeparator) } maven-assembly-plugin 2.5.3 io.fd.honeycomb.common minimal-assembly-descriptor 1.16.12-SNAPSHOT create-archive package single honeycomb-minimal maven-surefire-plugin ${argLine} -Djava.security.egd=file:${random.seed.file} org.codehaus.gmaven groovy-maven-plugin org.apache.maven.plugins maven-jar-plugin org.apache.maven.plugins maven-dependency-plugin maven-assembly-plugin