Fix MySQL scripts.

This commit is contained in:
Paulo Gustavo Veiga 2011-04-09 12:48:36 -03:00
parent 79b474e5aa
commit 8905fc5467
4 changed files with 16 additions and 9 deletions

View File

@ -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
@ -17,7 +18,7 @@ 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 ..

View File

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

View 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';

View File

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