mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 15:07:56 +01:00
Fix integration tests execution.
This commit is contained in:
parent
45a190bbac
commit
52ce817e3a
@ -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
|
||||
|
||||
|
||||
|
@ -311,12 +311,8 @@
|
||||
|
||||
<configuration>
|
||||
<driver>org.hsqldb.jdbc.JDBCDriver</driver>
|
||||
<url>jdbc:hsqldb:file:${project.basedir}/target/db/wisemapping</url>
|
||||
<url>jdbc:hsqldb:file:${project.build.directory}/db/wisemapping</url>
|
||||
<username>sa</username>
|
||||
<!--all executions are ignored if -Dmaven.test.skipDB=true
|
||||
Use this flag if you want to reuse an already created HSQL database instance
|
||||
-->
|
||||
<skip>${maven.test.skipDB}</skip>
|
||||
</configuration>
|
||||
|
||||
<dependencies>
|
||||
@ -494,6 +490,10 @@
|
||||
<name>org.mortbay.util.FileResource.checkAliases</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>database.base.url</name>
|
||||
<value>${project.build.directory}</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<!--<scanIntervalSeconds>10</scanIntervalSeconds>-->
|
||||
</configuration>
|
||||
@ -502,7 +502,7 @@
|
||||
<id>start-jetty</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>run-war</goal>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>0</scanIntervalSeconds>
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<beans>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<bean id="viewSecurityAdvisor"
|
||||
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||
|
@ -1,10 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
|
||||
|
||||
<context:property-placeholder location="/WEB-INF/app.properties"/>
|
||||
|
||||
<beans>
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="/WEB-INF/app.properties" />
|
||||
</bean>
|
||||
|
||||
<bean id="wiseDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="${database.driver}"/>
|
||||
|
@ -1,15 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
<beans>
|
||||
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
|
||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||
<property name="encoder" ref="encoder"/>
|
||||
</bean>
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
|
||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||
<property name="encoder" ref="encoder"/>
|
||||
</bean>
|
||||
|
||||
<bean id="mindmapManager" class="com.wisemapping.dao.MindmapManagerImpl">
|
||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||
</bean>
|
||||
|
||||
<bean id="mindmapManager" class="com.wisemapping.dao.MindmapManagerImpl">
|
||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||
</bean>
|
||||
</beans>
|
||||
</beans>
|
@ -2,16 +2,16 @@
|
||||
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:sec="http://www.springframework.org/schema/security"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/security
|
||||
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
||||
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="/WEB-INF/app.properties"/>
|
||||
</bean>
|
||||
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">
|
||||
|
||||
<context:property-placeholder location="/WEB-INF/app.properties"/>
|
||||
|
||||
<bean id="encoder"
|
||||
class="com.wisemapping.security.CustomPasswordEncoder"/>
|
||||
@ -73,10 +73,8 @@
|
||||
<property name="adminUser" value="${admin.user}"/>
|
||||
</bean>
|
||||
|
||||
<beans profile="production">
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="/WEB-INF/prod.properties" />
|
||||
</bean>
|
||||
<beans profile="heroku">
|
||||
<context:property-placeholder location="/WEB-INF/heroku.properties"/>
|
||||
</beans>
|
||||
|
||||
</beans>
|
@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<beans>
|
||||
<bean id="mailer" class="com.wisemapping.mail.Mailer" singleton="true">
|
||||
<bean id="mailer" class="com.wisemapping.mail.Mailer" scope ="singleton">
|
||||
<constructor-arg index="0" value="${mail.serverSendEmail}"/>
|
||||
<constructor-arg index="1" value="${mail.supportEmail}"/>
|
||||
<constructor-arg index="2" value="${mail.errorReporterEmail}"/>
|
||||
@ -74,7 +76,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="notificationService" class="com.wisemapping.mail.NotificationService" singleton="true">
|
||||
<bean id="notificationService" class="com.wisemapping.mail.NotificationService" scope ="singleton">
|
||||
<property name="baseUrl" value="${site.baseurl}"/>
|
||||
<property name="mailer" ref="mailer"/>
|
||||
</bean>
|
||||
|
@ -14,11 +14,9 @@
|
||||
<context:component-scan base-package="com.wisemapping.ncontroller"/>
|
||||
<context:annotation-config/>
|
||||
<mvc:annotation-driven/>
|
||||
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="/WEB-INF/app.properties"/>
|
||||
</bean>
|
||||
|
||||
<context:property-placeholder
|
||||
location="/WEB-INF/app.properties"
|
||||
/>
|
||||
|
||||
<!-- Interceptors Registration -->
|
||||
<mvc:interceptors>
|
||||
@ -114,8 +112,8 @@
|
||||
</bean>
|
||||
|
||||
<beans profile="heroku">
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="/WEB-INF/heroku.properties" />
|
||||
</bean>
|
||||
<context:property-placeholder
|
||||
location="/WEB-INF/heroku.properties"
|
||||
/>
|
||||
</beans>
|
||||
</beans>
|
||||
|
Loading…
Reference in New Issue
Block a user