Fix distribution creation

This commit is contained in:
Paulo Gustavo Veiga
2022-01-22 23:50:20 -08:00
parent 5923d514b7
commit 19354f4ec1
16 changed files with 49 additions and 482 deletions

View File

@@ -1,47 +1,23 @@
# Dockerizing WiseMapping: Dockerfile for building WiseMapping images
# Based on ubuntu:latest, installs WiseMapping (http://ww.wisemapping.org)
FROM ubuntu:latest
MAINTAINER Paulo Gustavo Veiga <pveiga@wisemapping.com>
# Based info setup ...
FROM tomcat:9.0-jdk17-openjdk
LABEL maintainer="Paulo Gustavo Veiga <pveiga@wisemapping.com>"
ENV DEBIAN_FRONTEND noninteractive
ENV MYSQL_ROOT_PASSWORD password
ENV WISE_VERSION 4.0.2
#Build variables ...
ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT"
ENV database.base.url="/var/wisemapping"
# Install utilities
RUN apt-get install -y zip
# Copy wisemapping distribution ...
COPY wisemapping.war /tmp
RUN mkdir ${WEBAPP_TARGET_DIR}
RUN cd ${WEBAPP_TARGET_DIR} && jar -xvf /tmp/wisemapping.war
RUN rm /tmp/wisemapping.war
# Prepare distribution
COPY target/wisemapping-v${WISE_VERSION}.zip .
RUN unzip wisemapping-v${WISE_VERSION}.zip
# Change logger to
RUN cp ${WEBAPP_TARGET_DIR}/WEB-INF/classes/log4j-stdout.properties ${WEBAPP_TARGET_DIR}/WEB-INF/classes/log4j.properties
# Install MySQL
RUN echo mysql-server mysql-server/root_password password ${MYSQL_ROOT_PASSWORD} | debconf-set-selections;\
echo mysql-server mysql-server/root_password_again password ${MYSQL_ROOT_PASSWORD} | debconf-set-selections;\
apt-get install -y mysql-server
RUN service mysql start && \
mysql -uroot -p${MYSQL_ROOT_PASSWORD} < /wisemapping-v${WISE_VERSION}/config/database/mysql/create-database.sql && \
mysql -uwisemapping -Dwisemapping -ppassword < /wisemapping-v${WISE_VERSION}/config/database/mysql/create-schemas.sql && \
mysql -uwisemapping -Dwisemapping -ppassword < /wisemapping-v${WISE_VERSION}/config/database/mysql/apopulate-schemas.sql
# Install Java 8
RUN apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java && \
apt-get update
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections;\
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections;\
sudo apt-get install -y oracle-java8-installer
# Configure instance
COPY docker-conf/app.properties wisemapping-v4.0.1/webapps/wisemapping/WEB-INF/app.properties
# Clean up
RUN apt-get clean
RUN rm wisemapping-v${WISE_VERSION}.zip
EXPOSE 8080
CMD "sh" "-c" "service mysql start;cd wisemapping-v${WISE_VERSION};./start.sh"
# Copy default HSQL DB for testing ...
RUN mkdir -p /var/wisemapping/db
COPY db/ /var/wisemapping/db

84
distribution/README.md Normal file
View File

@@ -0,0 +1,84 @@
This is an approach to compiling and installing wisemapping using docker and docker-compose.
In this way you can run the app without installing specific java, maven, tomcat and mysql versions in the host machine just for this project.
# Prerequisites
Make sure you have [docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) installed. You might also want to [run docker without sudo](https://docs.docker.com/engine/install/linux-postinstall/) if you are on linux.
# Compile wisemapping using docker
This is not required to run the app using docker. You might skip this section if you already have the `war` file or if you want to compile it by yourself.
We create a volume so the downloaded packages can be reused across different containers (a new container is created each time we run the image). This is run only once.
```
docker volume create --name maven-repo-wisemapping
```
Then we can run the following command from the project root:
```
docker run -it --rm --name wisemapping-compile \
-v maven-repo-wisemapping:/root/.m2 \
-v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3-jdk-11 \
mvn clean install -DskipTests
```
After that, you can find the result of the compilation in `wise-webapp/target/wisemapping.war`.
# Run using docker-compose
## Edit config
### app.properties
First of all, edit your `wise-webapp/src/main/webapp/WEB-INF/app.properties` to configure the app to use mysql.
- Uncomment the `MySQL 5.X configuration properties` section
- Change the `database.url` line to this: `database.url=jdbc:mysql://db/wisemapping?useUnicode=yes&characterEncoding=UTF-8` (the host is "db" instead of "localhost")
- Change the default username and password
- Comment the `HSQL Configuration properties` section
> Any time you make any config modification, you will have to re-compile the project, using the docker build shown before or any other method.
### docker-compose.yml
Review the `docker-compose.yml` file and edit it with your settings.
In the example provided the important bits are:
- `/opt/wisemapping-db`: this is where the mysql database files will be stored in your machine.
- Change the default password for the database to match your app.properties password. Please don't keep "password"!
- You might want to remove the `ports:` section in the db service if you don't want your db exposed to the outside.
```
ports:
- 3306:3306
```
- You might want to change the port mapping for web (by default it will run in port 8082)
```
ports:
- "8082:8080"
```
- Change `../wise-webapp/target/wisemapping.war` if you want to store the war file anywhere else in your machine. If you leave the default, the war file deployed will be overriden each time you build the app. You might not want that behavior.
## Running
Once the configs are ready, from this folder, run `docker-compose -p wise-webapp up -d` to run the web and the database containers as daemons. They will start automatically whith the machine.
You can check your docker running containers with `docker ps`.
To stop them you can run `docker-compose down` from this directory (doing this, they won't start automatically anymore).
Check out docker and docker-compose docs for more container management utilities.
## Areas for improvement
- Create a Dockerfile to build wise-webapp using an `app.properties` file mounted from this directory (make building easier).
- Simplify this documentation, simplify the process
- Allow to pass configuration as environment variables form docker-compose
If any of this can be improved, please submit a patch or issue.

View File

@@ -1,36 +0,0 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>editor</id>
<formats>
<format>zip</format>
</formats>
<files>
<file>
<source>core-js/target/classes/core.js</source>
<outputDirectory>/js</outputDirectory>
</file>
<file>
<source>mindplot/target/classes/mindplot-min.js</source>
<outputDirectory>/js</outputDirectory>
</file>
</files>
<fileSets>
<fileSet>
<outputDirectory>/</outputDirectory>
<directory>wise-editor/src/main/webapp</directory>
<includes>
<include>css/**/*</include>
<include>images/**/*</include>
<include>icons/**/*</include>
<include>js/editor.js</include>
<include>js/less*.js</include>
<include>js/mootools*.js</include>
<include>html/editor.html</include>
<include>html/*</include>
<include>samples/*</include>
<include>index.html</include>
</includes>
</fileSet>
</fileSets>
</assembly>

6
distribution/build-image.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -o
set -u
docker build -t wisemapping -f ./Dockerfile ../wise-webapp/target/

View File

@@ -1,159 +0,0 @@
##################################################################################
# Database Configuration
##################################################################################
# MariaDB configuration properties
database.url=jdbc:mariadb://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8
database.driver=org.mariadb.jdbc.Driver
database.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
database.username=wisemapping
database.password=mappingwise
database.validation.enabled=true
database.validation.query=SELECT 1
# MySQL 5.X configuration properties
#database.url=jdbc:mysql://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8
#database.driver=com.mysql.jdbc.Driver
#database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
#database.username=wisemapping
#database.password=password
#database.validation.enabled=true
#database.validation.query=SELECT 1
## PostgreSQL configuration properties
#database.url=jdbc:mariadb://localhost:3306/wisemapping
#database.driver=org.mariadb.jdbc.Driver
#database.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
#database.username=wisemapping
#database.password=password
#database.validation.query=
#database.validation.enabled=false
# HSQL Configuration properties
#database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping
#database.driver=org.hsqldb.jdbc.JDBCDriver
#database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
#database.username=sa
#database.password=
#database.validation.enabled=false
#database.validation.query=
##################################################################################
# Mail configuration. Must be configured to enable user registration confirmation.
##################################################################################
#------------------------
# Plain SMTP Server Configuration
#------------------------
mail.smtp.port=25
mail.smtp.host=localhost
mail.username=root
mail.password=
mail.smtp.auth=false
mail.smtp.starttls.enable=false
mail.smtp.quitwait=false
#------------------------
# GMAIL SMTP Configuration
#------------------------
#mail.smtp.port=587
#mail.smtp.host=smtp.gmail.com
#mail.username=<gmail-user-account>
#mail.password=<gmail-password>
#mail.smtp.auth=true
#mail.smtp.starttls.enable=true
#mail.smtp.quitwait=false
#------------------------
# Emails configuration
#------------------------
# Required: "from" email account that will appear in the emails sent from the sender.
mail.serverSendEmail=root@localhost
# Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site.
mail.supportEmail=root@localhost
# Optional: Unexpected errors will be reported to this address.
mail.errorReporterEmail=
##################################################################################
# Users Registration Configuration
##################################################################################
# Enable captcha confirmation
google.recaptcha2.enabled = true
# ReCaptcha is the default captcha. Public and private keys are required.
# More Info: http://www.google.com/recaptcha .
google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
##################################################################################
# Site configuration
##################################################################################
# Site administration user. This user will have special permissions for operations such as removing users, set password
# etc.
admin.user = admin@wisemapping.org
# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
# If you are planning to put wisemapping behind an Apache using an Apache Proxy setup, you must enable this property.
site.static.js.url = /static
# Site Homepage URL. This will be used as URL for homepage location.
site.homepage = c/home
##################################################################################
# Google Analytics Settings
##################################################################################
google.analytics.enabled=false
google.analytics.account=UA-XXXX
##################################################################################
# Google Ads enable
##################################################################################
google.ads.enabled=false
#######################################################################################
# Authentication Configuration Section
#######################################################################################
# Two type of security are supported:
# - db: User are stored in the database. Registration is required in advance.
# - ldap: Authentication takes place using a LDAP. In this case, security.ldap.* must be configured.
security.type=db
# LDAP Configuration properties.
security.ldap.server=ldap://localhost:389
# If anonymous password is required, change the wisemapping-security-ldap.xml removing the
security.ldap.server.user=cn=pveiga,dc=wisemapping,dc=com
security.ldap.server.password=password
security.ldap.basedn=dc=wisemapping,dc=com
# This will be concatenated as part of the DN. In this case, I will be "ou=people".
# In case this need to be changed, modify the wisemapping-security-ldap.xml.
security.ldap.subDn=ou=people
# Attribute used as authentication login (Eg: in this case, the user email will be used)
security.ldap.auth.attribute=mail
security.ldap.lastName.attribute=sn
security.ldap.firstName.attribute=givenName
# Enable OpenId Authentication.
security.openid.enabled=false
# REST Documentation
#
# This properties are used for REST API Documentation( http://localhost:8080/wisemapping/doc/rest/index.html)
# Change the URL for proper documentation console setup.
documentation.services.basePath=http://localhost:8080/service
documentation.services.version=3.0.1

View File

@@ -0,0 +1,10 @@
#
# Command: mysql -u root -p < create_database.sql
#
DROP DATABASE IF EXISTS wisemapping;
CREATE DATABASE IF NOT EXISTS wisemapping
CHARACTER SET = 'utf8'
COLLATE = 'utf8_unicode_ci';
GRANT ALL ON wisemapping.* TO 'wisemapping'@'localhost';
SET PASSWORD FOR 'wisemapping'@'localhost' = PASSWORD('password');

View File

@@ -0,0 +1,137 @@
#
# Command: mysql -u root -p < create_schemas.sql
#
USE wisemapping;
CREATE TABLE COLLABORATOR (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(255)
CHARACTER SET utf8 NOT NULL UNIQUE,
creation_date DATE
)
CHARACTER SET utf8;
CREATE TABLE USER (
colaborator_id INTEGER NOT NULL PRIMARY KEY,
authentication_type CHAR(1)
CHARACTER SET utf8 NOT NULL,
authenticator_uri VARCHAR(255)
CHARACTER SET utf8,
firstname VARCHAR(255) CHARACTER SET utf8 NOT NULL,
lastname VARCHAR(255) CHARACTER SET utf8 NOT NULL,
password VARCHAR(255) CHARACTER SET utf8 NOT NULL,
activation_code BIGINT(20) NOT NULL,
activation_date DATE,
allow_send_email CHAR(1) CHARACTER SET utf8 NOT NULL DEFAULT 0,
locale VARCHAR(5),
FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE MINDMAP (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(255)
CHARACTER SET utf8 NOT NULL,
description VARCHAR(255)
CHARACTER SET utf8 NOT NULL,
xml MEDIUMBLOB NOT NULL,
public BOOL NOT NULL DEFAULT 0,
creation_date DATETIME,
edition_date DATETIME,
creator_id INTEGER NOT NULL,
tags VARCHAR(1014)
CHARACTER SET utf8,
last_editor_id INTEGER NOT NULL,
FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE LABEL (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(30)
CHARACTER SET utf8 NOT NULL,
creator_id INTEGER NOT NULL,
parent_label_id INTEGER,
color VARCHAR(7) NOT NULL,
iconName VARCHAR(50) NOT NULL,
FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id),
FOREIGN KEY (parent_label_id) REFERENCES LABEL (id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE R_LABEL_MINDMAP (
mindmap_id INTEGER NOT NULL,
label_id INTEGER NOT NULL,
PRIMARY KEY (mindmap_id, label_id),
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id),
FOREIGN KEY (label_id) REFERENCES LABEL (id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE MINDMAP_HISTORY
(id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
xml MEDIUMBLOB NOT NULL,
mindmap_id INTEGER NOT NULL,
creation_date DATETIME,
editor_id INTEGER NOT NULL,
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE COLLABORATION_PROPERTIES (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
starred BOOL NOT NULL DEFAULT 0,
mindmap_properties VARCHAR(512)
CHARACTER SET utf8
)
CHARACTER SET utf8;
CREATE TABLE COLLABORATION (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
colaborator_id INTEGER NOT NULL,
properties_id INTEGER NOT NULL,
mindmap_id INTEGER NOT NULL,
role_id INTEGER NOT NULL,
FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id),
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id)
ON DELETE CASCADE
ON UPDATE NO ACTION,
FOREIGN KEY (properties_id) REFERENCES COLLABORATION_PROPERTIES (id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE TAG (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255)
CHARACTER SET utf8 NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES USER (colaborator_id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
CREATE TABLE ACCESS_AUDITORY (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
login_date DATE,
user_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES USER (colaborator_id)
ON DELETE CASCADE
ON UPDATE NO ACTION
)
CHARACTER SET utf8;
COMMIT;

View File

@@ -0,0 +1,13 @@
#
# Command: mysql -u root -p < apopulate_schemas.sql
#
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURRENT_DATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURRENT_DATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (2, 'Admin', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D');
COMMIT;

View File

@@ -1,65 +0,0 @@
#!/bin/bash
set -e
set -u
WISE_VERSION=$1
BASE_DIR=`pwd`
TARGET_DIR=$BASE_DIR/target
JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION
WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping
JETTY_VERSION=8.1.16.v20140903
JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION}
JETTY_ZIP=${JETTY_DIST_DIR}.zip
# Clean ...
mvn -o -f $BASE_DIR/../pom.xml clean
[ ! -e target ] && mkdir target
rm -fr ${JETTY_DIR}
rm -fr ${TARGET_DIR}/${JETTY_DIST_DIR}
# Prepare resources ..
mvn -o -f $BASE_DIR/../pom.xml package -Dmaven.test.skip=true
if [ ! -f ./target/${JETTY_ZIP} ]
then
echo "Download Jetty"
wget http://download.eclipse.org/jetty/${JETTY_VERSION}/dist/${JETTY_ZIP} -P $TARGET_DIR
fi
echo "Unzip Jetty ...:"
unzip ${TARGET_DIR}/${JETTY_ZIP} -d ${TARGET_DIR}/ > /dev/null
mv ${TARGET_DIR}/${JETTY_DIST_DIR} ${JETTY_DIR}
# Clean unsed files ...
rm -rf $JETTY_DIR/webapps/*
rm -rf $JETTY_DIR/contexts/*
rm -rf $JETTY_DIR/javadoc
# Now, start wise-webapps customization ...
echo "Unzip wisemappig.war ..."
mkdir $WISE_WEBAPP_DIR
unzip $BASE_DIR/../wise-webapp/target/wisemapping.war -d $WISE_WEBAPP_DIR >/dev/null
# DB Configuration ...
sed 's/\${database.base.url}\/db\/wisemapping/webapps\/wisemapping\/WEB-INF\/database\/wisemapping/' $WISE_WEBAPP_DIR/WEB-INF/app.properties > $WISE_WEBAPP_DIR/WEB-INF/app.properties2
mv $WISE_WEBAPP_DIR/WEB-INF/app.properties2 $WISE_WEBAPP_DIR/WEB-INF/app.properties
mkdir $WISE_WEBAPP_DIR/WEB-INF/database
cp -r $BASE_DIR/../wise-webapp/target/db/* $WISE_WEBAPP_DIR/WEB-INF/database/
cp $BASE_DIR/wisemapping.xml $JETTY_DIR/contexts/
# Distribute scripts
cp -r $BASE_DIR/../config/ $TARGET_DIR/wisemapping-$WISE_VERSION/config
cp ./start.sh ${JETTY_DIR}/
cp -r $BASE_DIR/service $TARGET_DIR/wisemapping-$WISE_VERSION/service
# Store version
echo $1 > $WISE_WEBAPP_DIR/version
git rev-parse HEAD >> $WISE_WEBAPP_DIR/version
# Zip all ...
cd $TARGET_DIR
zip -r wisemapping-$WISE_VERSION.zip wisemapping-$WISE_VERSION
cd ..

View File

@@ -1,72 +0,0 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: wisemapping
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: wisemapping
# Description: www.wisemapping.com
### END INIT INFO
set -e
set -u
#environmental variables
JAVA_HOME="/usr/lib/jvm/java7"
JDK_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
WISE_HOME="/opt/wisemapping"
PID_FILE="$WISE_HOME/.pid"
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
preInitChecks() {
MYSQL_STATUS=`pgrep mysql`
if [ -z $MYSQL_STATUS ]; then
service mysql start >/dev/null 2>&1
fi
}
wiseStatus() {
echo `pgrep -f "$WISE_HOME/start.jar"`
}
case "${1:-''}" in
'start')
#preInitChecks
cd $WISE_HOME
echo "Starting Wisemapping..."
java -Xmx256m -Dorg.apache.jasper.compiler.disablejsr199=true -jar $WISE_HOME/start.jar > $WISE_HOME/logs/start.log 2>&1 &
PID=$!
cd - >/dev/null 2>&1
echo "proccess id: $PID"
echo "$PID" > $PID_FILE
;;
'stop')
if [ ! -f $PID_FILE ]; then
PID=$(wiseStatus)
else
PID=`cat $PID_FILE`
rm $PID_FILE >/dev/null 2>&1
fi
kill $PID
echo "Wisemapping stopped"
;;
'restart')
set +e; $SELF stop; set -e
$SELF start
;;
'status')
STATUS=$(wiseStatus)
if [ -n "$STATUS" ]; then
echo "Wisemapping server is running, pid: $STATUS"
else
echo "Wisemapping is stopped"
fi
;;
*)
echo "Usage: $SELF start|stop|restart|status"
exit 1
;;
esac

View File

@@ -1,4 +0,0 @@
#!/bin/sh
java -Xmx256m -Dorg.apache.jasper.compiler.disablejsr199=true -jar start.jar

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- ==================================================================
Configure and deploy the wisemapping web application in $(jetty.home)/webapps/wisemapping
Note. If this file did not exist or used a context path other that /wisemapping
then the default configuration of jetty.xml would discover the wisemapping
webapplication with a WebAppDeployer. By specifying a context in this
directory, additional configuration may be specified and hot deployments
detected.
===================================================================== -->
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Required minimal context configuration : -->
<!-- + contextPath -->
<!-- + war OR resourceBase -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="contextPath">/wisemapping</Set>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/wisemapping
</Set>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- <Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/contexts/wisemapping.d/override-web.xml</Set> -->
<!-- virtual hosts
<Set name="virtualHosts">
<Array type="String">
<Item>www.myVirtualDomain.com</Item>
<Item>localhost</Item>
<Item>127.0.0.1</Item>
</Array>
</Set>
-->
<!-- disable cookies
<Get name="sessionHandler">
<Get name="sessionManager">
<Set name="usingCookies" type="boolean">false</Set>
</Get>
</Get>
-->
<Get name="securityHandler">
<Set name="loginService">
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties
</Set>
<!-- To enable reload of realm when properties change, uncomment the following lines -->
<!-- changing refreshInterval (in seconds) as desired -->
<!--
<Set name="refreshInterval">5</Set>
<Call name="start"></Call>
-->
</New>
</Set>
<Set name="checkWelcomeFiles">true</Set>
</Get>
<!-- Non standard error page mapping -->
<!--
<Get name="errorHandler">
<Call name="addErrorPage">
<Arg type="int">500</Arg>
<Arg type="int">599</Arg>
<Arg type="String">/dump/errorCodeRangeMapping</Arg>
</Call>
</Get>
-->
</Configure>