Author: norman
Date: Sun Apr 25 19:31:14 2010
New Revision: 937863
URL: http://svn.apache.org/viewvc?rev=937863&view=rev
Log:
Generate startup script and service script for james which can be used to start
james as service (JAMES-993)
Modified:
james/server/trunk/spring-deployment/pom.xml
james/server/trunk/spring-deployment/src/assemble/bin.xml
james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/Main.java
Modified: james/server/trunk/spring-deployment/pom.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/pom.xml?rev=937863&r1=937862&r2=937863&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/pom.xml (original)
+++ james/server/trunk/spring-deployment/pom.xml Sun Apr 25 19:31:14 2010
@@ -77,6 +77,44 @@
</platforms>
</program>
</programs>
+
+ <daemons>
+ <daemon>
+ <id>james</id>
+ <mainClass>org.apache.james.container.spring.Main</mainClass>
+ <commandLineArguments>
+ <commandLineArgument>start</commandLineArgument>
+ </commandLineArguments>
+ <platforms>
+ <platform>jsw</platform>
+ </platforms>
+ <generatorConfigurations>
+ <generatorConfiguration>
+ <generator>jsw</generator>
+ <configuration>
+ <property>
+ <name>configuration.directory.in.classpath.first</name>
+ <value>../conf</value>
+ </property>
+ <property>
+ <name>set.default.REPO_DIR</name>
+ <value>../lib</value>
+ </property>
+ <property>
+ <name>wrapper.working.dir</name>
+ <value>.</value>
+ </property>
+ <property>
+ <name>wrapper.logfile</name>
+ <value>log/wrapper.log</value>
+ </property>
+ </configuration>
+ </generatorConfiguration>
+ </generatorConfigurations>
+
+ </daemon>
+ </daemons>
+
</configuration>
<executions>
<execution>
@@ -84,6 +122,7 @@
<phase>package</phase>
<goals>
<goal>assemble</goal>
+ <goal>generate-daemons</goal>
</goals>
</execution>
</executions>
@@ -98,10 +137,15 @@
<configuration>
<tasks>
- <!-- this is only needed because windows freak out on
long cmd lines, so we strip of the absolute path
- from the lib dir to make windows happy again
-->
+ <!-- this is only needed because windows freak out on long cmd
lines, so we strip of the absolute path
+ from the lib dir to make windows happy again
+ -->
<replace
file="${project.build.directory}/appassembler/bin/run.bat"
token="%BASEDIR%\lib" value="..\lib"/>
<replace
file="${project.build.directory}/appassembler/bin/run.sh" token="setenv"
value="setenv.sh"/>
+
+ <!-- this is needed because appassembler is not really smart
on some settings -->
+ <replace
file="${project.build.directory}/appassembler/jsw/james/conf/wrapper.conf"
token="lib/wrapper.jar" value="%REPO_DIR%/wrapper.jar"/>
+ <replace
file="${project.build.directory}/appassembler/jsw/james/bin/james" token="logs"
value="var"/>
</tasks>
</configuration>
Modified: james/server/trunk/spring-deployment/src/assemble/bin.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/assemble/bin.xml?rev=937863&r1=937862&r2=937863&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/src/assemble/bin.xml (original)
+++ james/server/trunk/spring-deployment/src/assemble/bin.xml Sun Apr 25
19:31:14 2010
@@ -103,5 +103,30 @@
<include>setenv.sh</include>
</includes>
</fileSet>
+
+ <!-- include stuff from appassembler daemons-->
+ <fileSet>
+ <directory>target/appassembler/jsw/james/lib</directory>
+ <outputDirectory>lib</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/appassembler/jsw/james/conf</directory>
+ <outputDirectory>conf</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/appassembler/jsw/james/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ <includes>
+ <include>*.bat</include>
+ <include>*.exe</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/appassembler/jsw/james/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ </fileSet>
+
</fileSets>
</assembly>
\ No newline at end of file
Modified:
james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/Main.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/Main.java?rev=937863&r1=937862&r2=937863&view=diff
==============================================================================
---
james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/Main.java
(original)
+++
james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/Main.java
Sun Apr 25 19:31:14 2010
@@ -18,17 +18,14 @@
****************************************************************/
package org.apache.james.container.spring;
-
/**
* Bootstraps James using a Spring container
*/
-public class Main {
-
- public static void main(String[] args) {
- JamesServerApplicationContext context = new
JamesServerApplicationContext(
- new String[] {"spring-beans.xml"});
- context.registerShutdownHook();
+public class Main {
+ public static void main(String[] args) {
+ final JamesServerApplicationContext context = new
JamesServerApplicationContext(new String[] { "spring-beans.xml" });
+ context.registerShutdownHook();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]