mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-22 19:33:48 +01:00
Fix MySQL scripts.
This commit is contained in:
parent
79b474e5aa
commit
8905fc5467
@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
WISE_VERSION=0.96
|
||||
WISE_VERSION=$1
|
||||
BASE_DIR=`pwd`
|
||||
TARGET_DIR=$BASE_DIR/target
|
||||
JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION
|
||||
@ -12,12 +13,12 @@ JETTY_ZIP=${JETTY_DIST_DIR}.zip
|
||||
|
||||
# Clean ...
|
||||
mvn -f $BASE_DIR/../pom.xml clean
|
||||
[ ! -e target ] && mkdir target
|
||||
[ ! -e target ] && mkdir target
|
||||
rm -fr ${JETTY_DIR}
|
||||
rm -fr ${TARGET_DIR}/jetty-distribution-7.3.0.v20110203
|
||||
|
||||
# Prepare resources ..
|
||||
mvn -f $BASE_DIR/../pom.xml install
|
||||
mvn -f $BASE_DIR/../pom.xml install -Dmaven.test.skip=true
|
||||
|
||||
if [ ! -f ./target/${JETTY_ZIP} ]
|
||||
then
|
||||
@ -29,7 +30,6 @@ 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 -r $JETTY_DIR/webapps/*
|
||||
rm -r $JETTY_DIR/contexts/*
|
||||
@ -48,7 +48,11 @@ cp $BASE_DIR/wisemapping.xml $JETTY_DIR/contexts/
|
||||
sed 's/target\/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
|
||||
|
||||
#Build final Zip
|
||||
|
||||
# Distribute scripts
|
||||
cp -r $BASE_DIR/../wise-webapp/src/test/sql $TARGET_DIR/wisemapping-$WISE_VERSION/config
|
||||
|
||||
# Zip all ...
|
||||
cd $TARGET_DIR
|
||||
zip -r wisemapping-$WISE_VERSION.zip wisemapping-$WISE_VERSION
|
||||
cd ..
|
||||
|
@ -3,8 +3,8 @@
|
||||
#database.url=jdbc:mysql://localhost/wisemapping
|
||||
#database.driver=com.mysql.jdbc.Driver
|
||||
#database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
|
||||
#database.username=root
|
||||
#database.password=
|
||||
#database.username=wisemapping
|
||||
#database.password=password
|
||||
|
||||
# HSQL Configuration properties
|
||||
database.url=jdbc:hsqldb:file:target/db/wisemapping
|
||||
@ -23,4 +23,4 @@ mail.host=localhost
|
||||
mail.user=user
|
||||
mail.password=password
|
||||
mail.registrationEmail=root@localhost
|
||||
mail.siteEmail=root@localhost
|
||||
mail.siteEmail=root@localhost
|
||||
|
3
wise-webapp/src/test/sql/mysql/create-database.sql
Normal file
3
wise-webapp/src/test/sql/mysql/create-database.sql
Normal file
@ -0,0 +1,3 @@
|
||||
CREATE DATABASE wisemapping CHARACTER SET='utf8' COLLATE='utf8_unicode_ci';
|
||||
CREATE USER 'wisemapping'@'localhost' IDENTIFIED BY 'password';
|
||||
GRANT ALL ON wisemapping.* TO 'wisemapping'@'localhost';
|
@ -1,4 +1,4 @@
|
||||
INSERT INTO COLABORATOR(id,email,creation_date) values (1,'test@wisemapping.com',CURRENT_DATE());
|
||||
INSERT INTO COLABORATOR(id,email,creation_date) values (1,'test@wisemapping.org',CURRENT_DATE());
|
||||
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
|
||||
values(1,'Wise Mapping Test User','Wise','Test', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURRENT_DATE(),1);
|
||||
COMMIT;
|
||||
|
Loading…
Reference in New Issue
Block a user