diff --git a/.travis.yml b/.travis.yml
index a30c0f6a..2be8def4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: java
# We use the default of Trusty, otherwise JDK 7 is not available!
-# dist: xenial
+dist: trusty
matrix:
include:
diff --git a/appassembler-maven-plugin/pom.xml b/appassembler-maven-plugin/pom.xml
index 18f0ffff..5a8d1c0b 100644
--- a/appassembler-maven-plugin/pom.xml
+++ b/appassembler-maven-plugin/pom.xml
@@ -42,6 +42,7 @@
*
2
2.2.1
+ yajsw-stable-12.14
@@ -171,6 +172,24 @@
+
+ com.googlecode.maven-download-plugin
+ download-maven-plugin
+ 1.2.0
+
+
+ generate-resources
+
+ https://netix.dl.sourceforge.net/project/yajsw/yajsw/${yajsw.lib}/${yajsw.lib}.zip
+ ${project.build.directory}/dependency/yajsw-binaries
+ true
+
+
+ wget
+
+
+
+
org.apache.maven.plugins
maven-antrun-plugin
@@ -252,6 +271,44 @@
wrapper-*
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/bat
+ org/codehaus/mojo/appassembler/daemon/yajsw/bat
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/bin
+ org/codehaus/mojo/appassembler/daemon/yajsw/bin
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/scripts
+ org/codehaus/mojo/appassembler/daemon/yajsw/scripts
+
+ trayMessage.gv
+
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/templates
+ org/codehaus/mojo/appassembler/daemon/yajsw/templates
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/bin
+ org/codehaus/mojo/appassembler/daemon/yajsw/bin
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/conf
+ org/codehaus/mojo/appassembler/daemon/yajsw/conf
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/lib
+ org/codehaus/mojo/appassembler/daemon/yajsw/lib
+
+
+ target/dependency/yajsw-binaries/${yajsw.lib}/
+ org/codehaus/mojo/appassembler/daemon/yajsw/
+
+ *.jar
+
+
src/main/resources
diff --git a/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/yajsw/YetAnotherJavaServiceWrapperDaemonGenerator.java b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/yajsw/YetAnotherJavaServiceWrapperDaemonGenerator.java
new file mode 100644
index 00000000..64ed1cb8
--- /dev/null
+++ b/appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/yajsw/YetAnotherJavaServiceWrapperDaemonGenerator.java
@@ -0,0 +1,312 @@
+/**
+ *
+ * The MIT License
+ *
+ * Copyright 2006-2016 The MojoHaus
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+package org.codehaus.mojo.appassembler.daemon.yajsw;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.mojo.appassembler.daemon.DaemonGenerationRequest;
+import org.codehaus.mojo.appassembler.daemon.DaemonGenerator;
+import org.codehaus.mojo.appassembler.daemon.DaemonGeneratorException;
+import org.codehaus.mojo.appassembler.model.Daemon;
+import org.codehaus.mojo.appassembler.util.DependencyFactory;
+import org.codehaus.mojo.appassembler.util.FormattedProperties;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * @author Sandra Parsick
+ * @version $Id$
+ * @plexus.component role-hint="yajsw"
+ */
+public class YetAnotherJavaServiceWrapperDaemonGenerator
+ extends AbstractLogEnabled
+ implements DaemonGenerator
+{
+
+ private static List CORE_LIBS = new ArrayList()
+ {
+ {
+ add("commons/commons-cli-1.4.jar");
+ add("commons/commons-collections-3.2.2.jar");
+ add("commons/commons-configuration2-2.3.jar");
+ add("commons/commons-io-2.6.jar");
+ add("commons/commons-lang3-3.8.1.jar");
+ add("commons/commons-lang-2.6.jar");
+ add("commons/commons-logging-1.1.jar");
+ add("commons/commons-text-1.6.jar");
+ add("commons/commons-vfs2-2.2.jar");
+ add("jna/jna-5.3.1.jar");
+ add("jna/jna-platform-5.3.1.jar");
+ add("netty/netty-all-4.1.36.Final.jar");
+ add("yajsw/ahessian.jar");
+ }
+ };
+
+ private static List EXTENDED_LIBS = new ArrayList()
+ {
+ {
+ add("velocity/velocity-1.7.jar");
+ add("yajsw/hessian4.jar");
+ add("groovy/groovy-2.5.7.jar");
+ add("groovy/groovy-patch.jar");
+ }
+ };
+
+ private static List BAT_SCRIPTS = new ArrayList()
+ {
+ {
+ add("installService.bat");
+ add("runConsole.bat");
+ add("startService.bat");
+ add("stopService.bat");
+ add("uninstallService.bat");
+ add("setenv.bat");
+ add("wrapper.bat");
+ }
+ };
+
+ private static List SHELL_SCRIPTS = new ArrayList()
+ {
+ {
+ add("installDaemon.sh");
+ add("runConsole.sh");
+ add("startDaemon.sh");
+ add("stopDaemon.sh");
+ add("uninstallDaemon.sh");
+ add("setenv.sh");
+ add("wrapper.sh");
+ add("installDaemonNoPriv.sh");
+ add("uninstallDaemonNoPriv.sh");
+ add("startDaemonNoPriv.sh");
+ add("stopDaemonNoPriv.sh");
+ }
+ };
+
+ private static List GROOVY_SCRIPTS = new ArrayList()
+ {
+ {
+ add("trayMessage.gv");
+ }
+ };
+
+ private static List TEMPLATES = new ArrayList()
+ {
+ {
+ add("daemon.vm");
+ }
+ };
+
+ @Override
+ public void generate( DaemonGenerationRequest request ) throws DaemonGeneratorException
+ {
+ Daemon daemon = request.getDaemon();
+ File outputDirectory = new File( request.getOutputDirectory(), daemon.getId() );
+ writeWrapperConfFile(outputDirectory, daemon, request);
+ writeScripts(outputDirectory);
+ writeLibraries(outputDirectory);
+ }
+
+ private void writeWrapperConfFile(File outputDirectory, Daemon daemon, DaemonGenerationRequest request) throws DaemonGeneratorException
+ {
+ InputStream in = this.getClass().getResourceAsStream( "conf/wrapper.conf.default" );
+
+ if ( in == null )
+ {
+ throw new DaemonGeneratorException( "Could not load template." );
+ }
+
+ FormattedProperties confFile = new FormattedProperties();
+
+ try
+ {
+ confFile.read( in );
+ }
+ catch ( IOException e )
+ {
+ throw new DaemonGeneratorException( "Error reading template: " + e.getMessage(), e );
+ }
+ finally
+ {
+ IOUtil.close( in );
+ }
+
+ confFile.setProperty("wrapper.java.app.mainclass", daemon.getMainClass());
+ confFile.setProperty("wrapper.working.dir", "${wrapper_home}");
+
+ if( daemon.getJvmSettings() != null)
+ {
+ confFile.setProperty("wrapper.java.initmemory", daemon.getJvmSettings().getInitialMemorySize());
+ confFile.setProperty("wrapper.java.maxmemory", daemon.getJvmSettings().getMaxMemorySize());
+ createAdditional(daemon, confFile);
+ }
+ createClasspath(daemon, request, confFile);
+
+
+ ByteArrayOutputStream string = new ByteArrayOutputStream();
+ confFile.save( string );
+
+ writeFile(new File(outputDirectory, "conf/wrapper.conf"), new ByteArrayInputStream( string.toByteArray() ));
+
+ }
+
+ private void createClasspath(Daemon daemon, DaemonGenerationRequest request, FormattedProperties confFile)
+ {
+ final String wrapperClassPathPrefix = "wrapper.java.classpath.";
+ final String wrapperHome = "${wrapper_home}/";
+ final String repositoryName = daemon.getRepositoryName() + "/";
+
+ int counter = 1;
+ confFile.setProperty( wrapperClassPathPrefix + counter++, wrapperHome + "wrapper.jar" );
+
+ MavenProject project = request.getMavenProject();
+ ArtifactRepositoryLayout layout = request.getRepositoryLayout();
+
+ confFile.setProperty( wrapperClassPathPrefix + counter++, wrapperHome + repositoryName
+ + DependencyFactory.create( project.getArtifact(), layout, true,
+ request.getOutputFileNameMapping() ).getRelativePath() );
+
+ Iterator j = project.getRuntimeArtifacts().iterator();
+ while ( j.hasNext() )
+ {
+ Artifact artifact = (Artifact) j.next();
+
+ confFile.setProperty( wrapperClassPathPrefix + counter, wrapperHome + repositoryName
+ + DependencyFactory.create( artifact, layout, daemon.isUseTimestampInSnapshotFileName(),
+ request.getOutputFileNameMapping() ).getRelativePath() );
+ counter++;
+ }
+
+ }
+
+ private void createAdditional( Daemon daemon, FormattedProperties confFile )
+ {
+ int count = 1;
+ for (Iterator i = daemon.getJvmSettings().getSystemProperties().iterator(); i.hasNext(); count++ )
+ {
+ String systemProperty = (String) i.next();
+ confFile.setProperty( "wrapper.java.additional." + count, "-D" + systemProperty );
+ }
+ for ( Iterator i = daemon.getJvmSettings().getExtraArguments().iterator(); i.hasNext(); count++ )
+ {
+ String extraArgument = (String) i.next();
+ confFile.setProperty( "wrapper.java.additional." + count, extraArgument );
+ }
+ }
+
+
+ private void writeScripts(File outputDirectory) throws DaemonGeneratorException
+ {
+ for (String batScriptName : BAT_SCRIPTS)
+ {
+ String batScriptPath = "bat/" + batScriptName;
+ InputStream batScript = createInputStream(batScriptPath);
+ writeFile(new File(outputDirectory, batScriptPath), batScript);
+ }
+
+ for(String shellScriptName : SHELL_SCRIPTS)
+ {
+ String shellScriptPath = "bin/" + shellScriptName;
+ InputStream shellScript = createInputStream(shellScriptPath);
+ writeFile(new File(outputDirectory, shellScriptPath), shellScript);
+ }
+
+ for(String groovyScriptName : GROOVY_SCRIPTS)
+ {
+ String groovyScriptPath = "scripts/" + groovyScriptName;
+ InputStream groovyScript = createInputStream(groovyScriptPath);
+ writeFile(new File(outputDirectory, groovyScriptPath), groovyScript);
+ }
+
+ for(String templateScriptName : TEMPLATES) {
+ String templateScriptPath = "templates/" + templateScriptName;
+ InputStream templateScript = createInputStream(templateScriptPath);
+ writeFile(new File(outputDirectory, templateScriptPath), templateScript);
+ }
+ }
+
+ private void writeLibraries(File outputDirectory) throws DaemonGeneratorException
+ {
+ String wrapperJarName = "wrapper.jar";
+ InputStream wrapperJar = createInputStream(wrapperJarName);
+ writeFile(new File(outputDirectory, wrapperJarName), wrapperJar);
+
+ String wrapperAppJarName = "wrapperApp.jar";
+ InputStream wrapperAppJar = createInputStream(wrapperAppJarName);
+ writeFile(new File(outputDirectory, wrapperAppJarName), wrapperAppJar);
+
+
+ for (String core: CORE_LIBS)
+ {
+ String coreLibName = "lib/core/" + core;
+ InputStream coreLib = createInputStream(coreLibName);
+ writeFile(new File(outputDirectory, coreLibName), coreLib);
+ }
+
+ for(String extended : EXTENDED_LIBS)
+ {
+ String extendedLibName = "lib/extended/" + extended;
+ InputStream extendedLib = createInputStream(extendedLibName);
+ writeFile(new File(outputDirectory, extendedLibName), extendedLib);
+ }
+ }
+
+ private InputStream createInputStream(String resourceName) throws DaemonGeneratorException
+ {
+ InputStream resource = this.getClass().getResourceAsStream(resourceName);
+ if (resource == null)
+ {
+ throw new DaemonGeneratorException("Cannot load " + resourceName);
+ }
+ return resource;
+ }
+
+ private static void writeFile( File outputFile, InputStream inputStream )
+ throws DaemonGeneratorException
+ {
+ try
+ {
+ FileUtils.copyInputStreamToFile(inputStream, outputFile);
+ }
+ catch ( IOException e )
+ {
+ throw new DaemonGeneratorException( "Error writing output file: " + outputFile.getAbsolutePath(), e );
+ }
+ }
+
+}
diff --git a/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/jsw/JavaServiceWrapperDaemonGeneratorTest.java b/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/jsw/JavaServiceWrapperDaemonGeneratorTest.java
index 2e67daa7..4947c330 100644
--- a/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/jsw/JavaServiceWrapperDaemonGeneratorTest.java
+++ b/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/jsw/JavaServiceWrapperDaemonGeneratorTest.java
@@ -37,6 +37,7 @@
public class JavaServiceWrapperDaemonGeneratorTest
extends AbstractDaemonGeneratorTest
{
+
public void testGenerationWithAllInfoInDescriptor()
throws Exception
{
diff --git a/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/yajsw/YetAnotherJavaServiceWrapperDaemonGeneratorTest.java b/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/yajsw/YetAnotherJavaServiceWrapperDaemonGeneratorTest.java
new file mode 100644
index 00000000..de631845
--- /dev/null
+++ b/appassembler-maven-plugin/src/test/java/org/codehaus/mojo/appassembler/daemon/yajsw/YetAnotherJavaServiceWrapperDaemonGeneratorTest.java
@@ -0,0 +1,119 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.codehaus.mojo.appassembler.daemon.yajsw;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertTrue;
+import org.codehaus.mojo.appassembler.daemon.AbstractDaemonGeneratorTest;
+import static org.codehaus.plexus.PlexusTestCase.getBasedir;
+import static org.codehaus.plexus.PlexusTestCase.getTestFile;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.StringUtils;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * @author Sandra Parsick
+ * @version $Id$
+ */
+
+public class YetAnotherJavaServiceWrapperDaemonGeneratorTest
+ extends AbstractDaemonGeneratorTest
+{
+
+ public void testDefaultYAJSWFilesIfNoGeneratorConfigurationsIsSet()
+ throws Exception
+ {
+ runTest( "yajsw", "src/test/resources/project-5/pom.xml", "src/test/resources/project-5/descriptor.xml",
+ "target/output-5-yajsw" );
+
+ File yajswDir = getTestFile( "target/output-5-yajsw/app" );
+ File wrapper = new File( yajswDir, "conf/wrapper.conf" );
+
+ assertTrue( "Wrapper file is missing: " + wrapper.getAbsolutePath(), wrapper.isFile() );
+
+ assertEquals( normalizedLineEndingRead( "src/test/resources/org/codehaus/mojo/appassembler/daemon/yajsw/wrapper-5.conf" ),
+ trimWhitespacePerLine(wrapper));
+
+ assertFileExists(yajswDir, "bat/runConsole.bat");
+ assertFileExists(yajswDir, "bat/startService.bat");
+ assertFileExists(yajswDir, "bat/stopService.bat");
+ assertFileExists(yajswDir, "bat/uninstallService.bat");
+ assertFileExists(yajswDir, "bat/setenv.bat");
+ assertFileExists(yajswDir, "bat/wrapper.bat");
+ assertFileExists(yajswDir, "bin/runConsole.sh");
+ assertFileExists(yajswDir, "bin/installDaemon.sh");
+ assertFileExists(yajswDir, "bin/startDaemon.sh");
+ assertFileExists(yajswDir, "bin/stopDaemon.sh");
+ assertFileExists(yajswDir, "bin/uninstallDaemon.sh");
+ assertFileExists(yajswDir, "bin/setenv.sh");
+ assertFileExists(yajswDir, "bin/wrapper.sh");
+ assertFileExists(yajswDir, "bin/installDaemonNoPriv.sh");
+ assertFileExists(yajswDir, "bin/uninstallDaemonNoPriv.sh");
+ assertFileExists(yajswDir, "bin/startDaemonNoPriv.sh");
+ assertFileExists(yajswDir, "bin/stopDaemonNoPriv.sh");
+ assertFileExists( yajswDir, "wrapper.jar" );
+ assertFileExists( yajswDir, "wrapperApp.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-cli-1.4.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-collections-3.2.2.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-configuration2-2.3.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-io-2.6.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-lang3-3.8.1.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-lang-2.6.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-logging-1.1.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-text-1.6.jar" );
+ assertFileExists( yajswDir, "lib/core/commons/commons-vfs2-2.2.jar" );
+ assertFileExists( yajswDir, "lib/core/jna/jna-5.3.1.jar");
+ assertFileExists( yajswDir, "lib/core/jna/jna-platform-5.3.1.jar");
+ assertFileExists( yajswDir, "lib/core/jna/jna-platform-5.3.1.jar");
+ assertFileExists( yajswDir, "lib/core/netty/netty-all-4.1.36.Final.jar");
+ assertFileExists( yajswDir, "lib/core/yajsw/ahessian.jar");
+ assertFileExists( yajswDir, "lib/extended/groovy/groovy-2.5.7.jar");
+ assertFileExists( yajswDir, "lib/extended/groovy/groovy-patch.jar");
+ assertFileExists( yajswDir, "lib/extended/velocity/velocity-1.7.jar");
+ assertFileExists( yajswDir, "lib/extended/yajsw/hessian4.jar");
+ assertFileExists( yajswDir, "scripts/trayMessage.gv");
+ assertFileExists(yajswDir, "templates/daemon.vm");
+ }
+
+ private String trimWhitespacePerLine(File wrapper) throws IOException {
+ List readLines = org.apache.commons.io.FileUtils.readLines(wrapper);
+
+ StringBuilder file = new StringBuilder();
+ for(String line : readLines) {
+ String trimmedLine = line.trim();
+ file.append(trimmedLine);
+ file.append("\n");
+ }
+ return file.toString();
+ }
+
+ private String normalizedLineEndingRead( String file )
+ throws IOException
+ {
+ String expected = FileUtils.fileRead( getTestFile( file ) );
+ return StringUtils.unifyLineSeparators( expected );
+ }
+
+ private static void assertFileExists( File jswDir, String file )
+ {
+ File wrapperJar = new File( jswDir, file );
+
+ assertTrue( "File is missing: " + wrapperJar.getAbsolutePath(), wrapperJar.isFile() );
+ }
+
+ private static void assertFileNotExists( File jswDir, String file )
+ {
+ File wrapperJar = new File( jswDir, file );
+
+ assertFalse( "File should be missing: " + wrapperJar.getAbsolutePath(), wrapperJar.isFile() );
+ }
+
+}
diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/yajsw/wrapper-5.conf b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/yajsw/wrapper-5.conf
new file mode 100644
index 00000000..f47217b0
--- /dev/null
+++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/yajsw/wrapper-5.conf
@@ -0,0 +1,298 @@
+# WARNING - Do not modify any of the properties when an application
+# using this configuration file has been installed as a service or daemon.
+# Please uninstall the service before modifying this file. The
+# service must then be reinstalled.
+
+#********************************************************************
+# Java Executable Properties
+#********************************************************************
+# Java Application
+#wrapper.java.command=java
+
+# or define conditions for YAJSW searching for a JVM
+# currently only valid for windows
+#wrapper.java.command.minVersion=1.5
+#wrapper.java.command.maxVersion=1.6
+#wrapper.java.command.jreOnly=true
+#wrapper.java.command.jdkOnly=true
+#wrapper.java.command.preferJre=true
+#wrapper.java.command.preferJdk=true
+#wrapper.java.command.javaw=true
+
+# copy java.exe to /java__nnnn.exe
+#wrapper.java.customProcName=
+
+#********************************************************************
+# working directory
+#********************************************************************
+wrapper.working.dir=${wrapper_home}
+
+# Java Main class.
+# YAJSW: default is "org.rzo.yajsw.app.WrapperJVMMain"
+# DO NOT SET THIS PROPERTY UNLESS YOU HAVE YOUR OWN IMPLEMENTATION
+# wrapper.java.mainclass=
+
+#********************************************************************
+# tmp folder
+# yajsw creates temporary files named in_.. out_.. err_.. jna..
+# per default these are placed in jna.tmpdir.
+# jna.tmpdir is set in setenv batch file to /tmp
+#********************************************************************
+wrapper.tmp.path=${jna_tmpdir}
+
+
+#********************************************************************
+# Application main class or native executable
+# One of the following properties MUST be defined
+#********************************************************************
+
+# Java Application main class
+wrapper.java.app.mainclass=com.westerngeco.example.App
+
+# or jar file
+#wrapper.java.app.jar=
+
+# or groovy script file
+#wrapper.groovy=
+
+#or a native executable
+#wrapper.image=
+
+#********************************************************************
+# Application process cpu priority and affinity
+#********************************************************************
+
+# Process priority: LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH
+#wrapper.priority
+
+# CPU affinity of the process. this is a bit-array representing the cpus
+#wrapper.affinity=
+
+
+#********************************************************************
+# Application Account
+# Equivalent to Posix sudo or windows runas
+# Note Posix:
+# \ (note: use \\ in configuration file).
+# If no group is configured default group of the user is used
+#********************************************************************
+#wrapper.app.account=
+#wrapper.app.password=
+
+#********************************************************************
+# Java/Groovy Application Properties
+#********************************************************************
+
+# Java Classpath (include wrapper.jar) Add class path elements as
+# needed starting from 1
+# YAJSW: all libs required by YAJSW are in the manifest of the wrapper.jar -> only classpath of your application is required
+#wrapper.java.classpath.1=
+wrapper.java.classpath.1=${wrapper_home}/wrapper.jar
+wrapper.java.classpath.2=${wrapper_home}/lib/org/codehaus/mojo/appassembler/project-1/1.0-SNAPSHOT/project-1-1.0-SNAPSHOT.jar
+wrapper.java.classpath.3=${wrapper_home}/lib/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
+
+# Java Library Path
+# YAJSW: required dll are encapsulated in jar files -> only library path of your application required
+# wrapper.java.library.path.1=../lib
+
+# Java Additional Parameters
+#wrapper.java.additional.1=
+wrapper.java.additional.1=-Dfoo=bar
+wrapper.java.additional.2=-Dbar=foo
+wrapper.java.additional.3=-splash:niceImage.png
+
+# Initial Java Heap Size (in MB)
+# alternative for wrapper.java.additional.=-Xms
+#wrapper.java.initmemory=3
+wrapper.java.initmemory=345
+
+# % of total RAM
+#wrapper.java.initmemory.relative=10
+
+# Maximum Java Heap Size (in MB)
+# alternative for wrapper.java.additional.=-Xmx
+#wrapper.java.maxmemory=64
+wrapper.java.maxmemory=234
+
+# % of total RAM
+#wrapper.java.maxmemory.relative=30
+
+# JSW requires that main class is set as app.parameter property
+# YAJSW: to specify the main class please use wrapper.java.app.mainclass=
+
+#********************************************************************
+# Application environment properties.
+#********************************************************************
+# Adds an environment to the application
+#wrapper.app.env.=
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console. (See docs for formats)
+# wrapper.console.format=PM
+
+# Log Level for console output. (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile=${wrapper_home}/log/wrapper.log
+
+# Format of output for the log file. (See docs for formats)
+#wrapper.logfile.format=LPTM
+
+# Log Level for log file output. (See docs for log levels)
+#wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+# the log is rolled. Size is specified in bytes. The default value
+# of 0, disables log rolling by size. May abbreviate with the 'k' (kB) or
+# 'm' (mB) suffix. For example: 10m = 10 megabytes.
+# If wrapper.logfile does not contain the string ROLLNUM it will be automatically added as suffix of the file name
+wrapper.logfile.maxsize=10m
+
+# Maximum number of rolled log files which will be allowed before old
+# files are deleted. The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=10
+
+# Controls the roll mode of the log file
+# possible values: DATE, WRAPPER, JVM
+# If DATE is set wrapper.logfile should contain the string YYYYMMDD
+# If DATE is set and wrapper.logfile.maxsize is set the log file will be rolled by size and date
+# If DATE is set and wrapper.logfile.maxfiles older files rolled by size or date are deleted
+#wrapper.logfile.rollmode=DATE
+
+#********************************************************************
+# Application Console Properties
+#********************************************************************
+# Indicate if console of the application is visible.
+#wrapper.console.visible=false
+
+# Title to use when running as a console
+wrapper.console.title=yajsw
+
+#********************************************************************
+# Wrapper Windows Service and Posix Daemon Properties
+#********************************************************************
+# Name of the service
+wrapper.ntservice.name=yajsw
+
+# Display name of the service
+wrapper.ntservice.displayname=yajsw
+
+# Description of the service
+wrapper.ntservice.description=yajsw
+
+# Service dependencies. Add dependencies as needed starting from 1
+# wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed. AUTO_START or DEMAND_START
+# wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+# wrapper.ntservice.interactive=false
+
+# wrapper service user. only for windows. on *nix system this is root.
+# see also wrapper.app.account
+#wrapper.ntservice.account=
+#wrapper.ntservice.password=
+
+#********************************************************************
+# Wrapper Posix Daemon Properties
+#********************************************************************
+# Directory in which to create and execute daemon init scripts. Default: /etc/init.d
+#wrapper.daemon.dir =
+
+# Directory where to store the wrapper pid file. Default: /var/run
+#wrapper.daemon.pid.dir =
+
+# Directory in which to create K... and S... links.
+# Default: /rcX.d
+# For Ubuntu set to /etc/rcX.d
+# The following grooy script should set it correctly for most distros
+wrapper.daemon.run_level_dir=${if (new File('/etc/rc0.d').exists()) return '/etc/rcX.d' else return '/etc/init.d/rcX.d'}
+
+# Setting the runlevels and priorities for automatic startup and stop of the daemon.
+# Similar syntax as the update_rc.d command
+# Default: equivalent to default of update_rc.d
+#wrapper.daemon.update_rc = start 20 2 3 4 . start 30 5 . stop 80 0 1 6
+
+#********************************************************************
+# Wrapper System Tray Properties
+#********************************************************************
+# enable system tray
+wrapper.tray=true
+
+# TCP/IP port. If none is defined multicast discovery is used to find the port
+# Set the port in case multicast is not possible.
+wrapper.tray.port=15002
+
+# icon file to use, per default a console icon is used
+#wrapper.tray.icon=
+
+#********************************************************************
+# Exit Code Properties
+# Restart on non zero exit code
+#********************************************************************
+wrapper.on_exit.0=SHUTDOWN
+wrapper.on_exit.default=RESTART
+
+#********************************************************************
+# Posix Signal Properties
+# Restart on non 9 signal code
+#********************************************************************
+wrapper.on_signal.9=SHUTDOWN
+wrapper.on_signal.default=RESTART
+
+#********************************************************************
+# Trigger actions on console output
+#********************************************************************
+# On Exception show message in system tray
+wrapper.filter.trigger.0=Exception
+wrapper.filter.script.0=${wrapper_home}/scripts/trayMessage.gv
+wrapper.filter.script.0.args=Exception
+
+#********************************************************************
+# Wrapper JMX
+#
+# connect using for example jconsole per remote access using the url
+#
+# service:jmx:rmi:///jndi/rmi://localhost:1099/server
+#
+# eventl. change port and server name
+#********************************************************************
+# Enable wrapper JMX
+#wrapper.jmx = true
+
+# JMX RMI port. default is 1099
+#wrapper.jmx.rmi.port =
+
+# JMX RMI credentials
+# mandatory if accessing from remote server
+#wrapper.jmx.rmi.user =
+#wrapper.jmx.rmi.password =
+
+#********************************************************************
+# Wrapper timeouts
+#********************************************************************
+# Number of seconds to allow between the time that the Wrapper starts the application
+# and the application logon to the wrapper.
+# Default: 30 seconds
+#wrapper.startup.timeout =
+
+# Number of seconds to allow between the time that the Wrapper asks the application to shutdown and the time that the JVM shuts down.
+# Default: 30 seconds
+#wrapper.shutdown.timeout =
+
+# Number of seconds the wrapper waits for a ping message from the java application.
+# If no heart beat is received within a timeout the wrapper assumes that the application
+# is non responsive and will restart it.
+# Default: 30 seconds
+#wrapper.ping.timeout =
+
+
+
+#********************************************************************
+# genConfig: further Properties generated by genConfig
+#********************************************************************
+placeHolderSoGenPropsComeHere=