From 9184c073707ea341ea2c971f6cdd11eb4f0231a3 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Mon, 14 Feb 2011 17:23:18 +0100 Subject: [PATCH] remove jsw, because of mission win x64 support --- .../sonia/scm/server/ServerApplication.java | 18 ++++ scm-server/pom.xml | 44 +++++++++- .../src/main/assembly/scm-server-app.xml | 83 +++++++++++++++++++ scm-server/src/main/conf/server-config.xml | 4 +- 4 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 scm-server/src/main/assembly/scm-server-app.xml diff --git a/scm-server-api/src/main/java/sonia/scm/server/ServerApplication.java b/scm-server-api/src/main/java/sonia/scm/server/ServerApplication.java index 0ef85f19f1..fac659b671 100644 --- a/scm-server-api/src/main/java/sonia/scm/server/ServerApplication.java +++ b/scm-server-api/src/main/java/sonia/scm/server/ServerApplication.java @@ -54,6 +54,12 @@ public class ServerApplication /** Field description */ public static final String APPINFO = "/app-info.xml"; + /** Field description */ + public static final String PROPERTY_BASEDIR = "basedir"; + + /** Field description */ + public static final String PROPERTY_SCMBASEDIR = "scm.basedir"; + /** Field description */ public static final int RETURNCODE_CLI_ERROR = 2; @@ -97,6 +103,18 @@ public class ServerApplication System.exit(RETURNCODE_MISSING_SERVER_IMPLEMENTATION); } + String basedir = System.getProperty(PROPERTY_BASEDIR); + + if (basedir != null) + { + if (!basedir.endsWith(File.separator)) + { + basedir = basedir.concat(File.separator); + } + + System.setProperty(PROPERTY_SCMBASEDIR, basedir); + } + File webapp = new File("webapp", appInfo.getAppName()); server.start(webapp); diff --git a/scm-server/pom.xml b/scm-server/pom.xml index 42fc3aaed6..23f89f0430 100644 --- a/scm-server/pom.xml +++ b/scm-server/pom.xml @@ -42,11 +42,14 @@ 1.1 + scm-jsw + ${project.build.directory}/appassembler ${project.build.directory}/appassembler/jsw/scm-server @@ -106,7 +109,32 @@ - + + + + scm-app + package + + assemble + + + ${project.build.directory}/appassembler/app/scm-server + lib + flat + true + + conf + true + src/main/conf + true + + + sonia.scm.server.ServerApplication + scm-server + + @@ -124,6 +152,7 @@ + + + ${project.groupId} + scm-webapp + ${project.version} + war + ${project.build.directory}/appassembler/app/scm-server/webapp + scm-webapp.war + @@ -144,12 +182,14 @@ 2.2 + + src/main/assembly/scm-server-app.xml - jsw package single diff --git a/scm-server/src/main/assembly/scm-server-app.xml b/scm-server/src/main/assembly/scm-server-app.xml new file mode 100644 index 0000000000..13761f3710 --- /dev/null +++ b/scm-server/src/main/assembly/scm-server-app.xml @@ -0,0 +1,83 @@ + + + + + + app + + + zip + tar.gz + + + true + + + + + target/appassembler/app/scm-server/bin + false + bin + 0755 + + + + target/appassembler/app/scm-server/conf + true + conf + + + + target/appassembler/app/scm-server/lib + false + lib + + + + target/appassembler/app/scm-server/webapp + false + webapp + + + + src/main/docroot + false + webapp/docroot + + + + + \ No newline at end of file diff --git a/scm-server/src/main/conf/server-config.xml b/scm-server/src/main/conf/server-config.xml index 832a16b5c2..0391836773 100644 --- a/scm-server/src/main/conf/server-config.xml +++ b/scm-server/src/main/conf/server-config.xml @@ -29,7 +29,7 @@ /scm - webapp/scm-webapp.war + webapp/scm-webapp.war @@ -38,7 +38,7 @@ - webapp/docroot + webapp/docroot