From 52ce817e3ab6a8d48a1aae279cf0e14433a6f9c8 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 4 Nov 2012 01:06:02 -0300 Subject: [PATCH] Fix integration tests execution. --- distribution/package-bin.sh | 2 +- wise-webapp/pom.xml | 12 ++++----- .../wisemapping/mail/NotificationService.java | 3 ++- .../wisemapping/rest/model/RestMindmap.java | 1 - .../src/main/webapp/WEB-INF/app.properties | 2 +- .../main/webapp/WEB-INF/wisemapping-aop.xml | 7 ++--- .../main/webapp/WEB-INF/wisemapping-dao.xml | 14 ++++++---- .../main/webapp/WEB-INF/wisemapping-model.xml | 26 ++++++++++--------- .../webapp/WEB-INF/wisemapping-security.xml | 16 +++++------- .../webapp/WEB-INF/wisemapping-service.xml | 10 ++++--- .../webapp/WEB-INF/wisemapping-servlet.xml | 14 +++++----- 11 files changed, 56 insertions(+), 51 deletions(-) diff --git a/distribution/package-bin.sh b/distribution/package-bin.sh index edfaf11d..baf41057 100755 --- a/distribution/package-bin.sh +++ b/distribution/package-bin.sh @@ -43,7 +43,7 @@ mkdir $WISE_WEBAPP_DIR unzip $BASE_DIR/../wise-webapp/target/wisemapping.war -d $WISE_WEBAPP_DIR >/dev/null # DB Configuration ... -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 +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 diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index bbb42f98..c2dcbdf6 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -311,12 +311,8 @@ org.hsqldb.jdbc.JDBCDriver - jdbc:hsqldb:file:${project.basedir}/target/db/wisemapping + jdbc:hsqldb:file:${project.build.directory}/db/wisemapping sa - - ${maven.test.skipDB} @@ -494,6 +490,10 @@ org.mortbay.util.FileResource.checkAliases false + + database.base.url + ${project.build.directory} + @@ -502,7 +502,7 @@ start-jetty pre-integration-test - run-war + run 0 diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java index da6cb137..c047d657 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java @@ -123,7 +123,8 @@ final public class NotificationService { private void handleException(Exception e) { System.err.println("An expected error has occurred trying to send an email notification. Usually, the main reason for this is that the SMTP server properties has not been configured properly. Edit the WEB-INF/app.properties file and verify the SMTP server configuration properties."); - e.printStackTrace(); + System.err.println("Cause:" + e.getMessage()); + } public void setBaseUrl(String baseUrl) { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java index 8df2c781..6a16d1cb 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java @@ -34,7 +34,6 @@ public class RestMindmap { public RestMindmap() throws WiseMappingException { this(new Mindmap(), null); - } public RestMindmap(@NotNull Mindmap mindmap, @Nullable Collaborator collaborator) throws WiseMappingException { diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index e63aff27..9d9189e3 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -13,7 +13,7 @@ #database.validation.query=SELECT 1 # HSQL Configuration properties -database.url=jdbc:hsqldb:file:target/db/wisemapping +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 diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml index 68e4bb3e..4a5a7338 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml @@ -1,7 +1,8 @@ - - - + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml index 871a472f..1f690e87 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml @@ -1,10 +1,14 @@ - + + + - - - - diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml index 946b5078..97e97080 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml @@ -1,15 +1,17 @@ - + + + + + + - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index c2e525d6..92352c2d 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -2,16 +2,16 @@ - - - - + http://www.springframework.org/schema/security/spring-security-3.1.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context.xsd"> + @@ -73,10 +73,8 @@ - - - - + + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml index fc8e0091..bbd9fcf5 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml @@ -1,8 +1,10 @@ - + - - + @@ -74,7 +76,7 @@ - + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index b150a358..215414ce 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -14,11 +14,9 @@ - - - - - + @@ -114,8 +112,8 @@ - - - +