remove jsw, because of mission win x64 support

This commit is contained in:
Sebastian Sdorra
2011-02-14 17:23:18 +01:00
parent 0589365c40
commit 9184c07370
4 changed files with 145 additions and 4 deletions

View File

@@ -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);

View File

@@ -42,11 +42,14 @@
<version>1.1</version>
<executions>
<execution>
<id>scm-jsw</id>
<!--
<phase>package</phase>
<goals>
<goal>create-repository</goal>
<goal>generate-daemons</goal>
</goals>
-->
<configuration>
<target>${project.build.directory}/appassembler</target>
<assembleDirectory>${project.build.directory}/appassembler/jsw/scm-server</assembleDirectory>
@@ -106,7 +109,32 @@
</daemon>
</daemons>
</configuration>
</execution>
<execution>
<id>scm-app</id>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
<configuration>
<assembleDirectory>${project.build.directory}/appassembler/app/scm-server</assembleDirectory>
<repositoryName>lib</repositoryName>
<repositoryLayout>flat</repositoryLayout>
<showConsoleWindow>true</showConsoleWindow>
<!--
<extraJvmArguments>-Xms256m -Xmx256m</extraJvmArguments>
-->
<configurationDirectory>conf</configurationDirectory>
<copyConfigurationDirectory>true</copyConfigurationDirectory>
<configurationSourceDirectory>src/main/conf</configurationSourceDirectory>
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
<programs>
<program>
<mainClass>sonia.scm.server.ServerApplication</mainClass>
<name>scm-server</name>
</program>
</programs>
</configuration>
</execution>
</executions>
@@ -124,6 +152,7 @@
</goals>
<configuration>
<artifactItems>
<!--
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>scm-webapp</artifactId>
@@ -132,6 +161,15 @@
<outputDirectory>${project.build.directory}/appassembler/jsw/scm-server/webapp</outputDirectory>
<destFileName>scm-webapp.war</destFileName>
</artifactItem>
-->
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>scm-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
<outputDirectory>${project.build.directory}/appassembler/app/scm-server/webapp</outputDirectory>
<destFileName>scm-webapp.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -144,12 +182,14 @@
<version>2.2</version>
<configuration>
<descriptors>
<!--
<descriptor>src/main/assembly/scm-server-jsw.xml</descriptor>
-->
<descriptor>src/main/assembly/scm-server-app.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>jsw</id>
<phase>package</phase>
<goals>
<goal>single</goal>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, Sebastian Sdorra
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of SCM-Manager; nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
http://bitbucket.org/sdorra/scm-manager
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>app</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>target/appassembler/app/scm-server/bin</directory>
<filtered>false</filtered>
<outputDirectory>bin</outputDirectory>
<directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
<directory>target/appassembler/app/scm-server/conf</directory>
<filtered>true</filtered>
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>target/appassembler/app/scm-server/lib</directory>
<filtered>false</filtered>
<outputDirectory>lib</outputDirectory>
</fileSet>
<fileSet>
<directory>target/appassembler/app/scm-server/webapp</directory>
<filtered>false</filtered>
<outputDirectory>webapp</outputDirectory>
</fileSet>
<fileSet>
<directory>src/main/docroot</directory>
<filtered>false</filtered>
<outputDirectory>webapp/docroot</outputDirectory>
</fileSet>
</fileSets>
</assembly>

View File

@@ -29,7 +29,7 @@
<New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/scm</Set>
<Set name="war">webapp/scm-webapp.war</Set>
<Set name="war"><SystemProperty name="scm.basedir" default=""/>webapp/scm-webapp.war</Set>
</New>
<New id="docroot" class="org.eclipse.jetty.webapp.WebAppContext">
@@ -38,7 +38,7 @@
<New class="org.eclipse.jetty.util.resource.ResourceCollection">
<Arg>
<Array type="java.lang.String">
<Item>webapp/docroot</Item>
<Item><SystemProperty name="scm.basedir" default=""/>webapp/docroot</Item>
</Array>
</Arg>
</New>