mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 23:17: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
|
unzip $BASE_DIR/../wise-webapp/target/wisemapping.war -d $WISE_WEBAPP_DIR >/dev/null
|
||||||
|
|
||||||
# DB Configuration ...
|
# 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
|
mv $WISE_WEBAPP_DIR/WEB-INF/app.properties2 $WISE_WEBAPP_DIR/WEB-INF/app.properties
|
||||||
|
|
||||||
|
|
||||||
|
@ -311,12 +311,8 @@
|
|||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<driver>org.hsqldb.jdbc.JDBCDriver</driver>
|
<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>
|
<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>
|
</configuration>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -494,6 +490,10 @@
|
|||||||
<name>org.mortbay.util.FileResource.checkAliases</name>
|
<name>org.mortbay.util.FileResource.checkAliases</name>
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
</systemProperty>
|
</systemProperty>
|
||||||
|
<systemProperty>
|
||||||
|
<name>database.base.url</name>
|
||||||
|
<value>${project.build.directory}</value>
|
||||||
|
</systemProperty>
|
||||||
</systemProperties>
|
</systemProperties>
|
||||||
<!--<scanIntervalSeconds>10</scanIntervalSeconds>-->
|
<!--<scanIntervalSeconds>10</scanIntervalSeconds>-->
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -502,7 +502,7 @@
|
|||||||
<id>start-jetty</id>
|
<id>start-jetty</id>
|
||||||
<phase>pre-integration-test</phase>
|
<phase>pre-integration-test</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run-war</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<scanIntervalSeconds>0</scanIntervalSeconds>
|
<scanIntervalSeconds>0</scanIntervalSeconds>
|
||||||
|
@ -123,7 +123,8 @@ final public class NotificationService {
|
|||||||
|
|
||||||
private void handleException(Exception e) {
|
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.");
|
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) {
|
public void setBaseUrl(String baseUrl) {
|
||||||
|
@ -34,7 +34,6 @@ public class RestMindmap {
|
|||||||
|
|
||||||
public RestMindmap() throws WiseMappingException {
|
public RestMindmap() throws WiseMappingException {
|
||||||
this(new Mindmap(), null);
|
this(new Mindmap(), null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public RestMindmap(@NotNull Mindmap mindmap, @Nullable Collaborator collaborator) throws WiseMappingException {
|
public RestMindmap(@NotNull Mindmap mindmap, @Nullable Collaborator collaborator) throws WiseMappingException {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#database.validation.query=SELECT 1
|
#database.validation.query=SELECT 1
|
||||||
|
|
||||||
# HSQL Configuration properties
|
# 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.driver=org.hsqldb.jdbc.JDBCDriver
|
||||||
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
||||||
database.username=sa
|
database.username=sa
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-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 xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<beans>
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||||
|
|
||||||
<bean id="viewSecurityAdvisor"
|
<bean id="viewSecurityAdvisor"
|
||||||
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-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 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">
|
<bean id="wiseDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||||
<property name="driverClassName" value="${database.driver}"/>
|
<property name="driverClassName" value="${database.driver}"/>
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-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 xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<beans>
|
xsi:schemaLocation="
|
||||||
|
http://www.springframework.org/schema/beans
|
||||||
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
<beans>
|
||||||
<property name="encoder" ref="encoder"/>
|
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
|
||||||
</bean>
|
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||||
|
<property name="encoder" ref="encoder"/>
|
||||||
<bean id="mindmapManager" class="com.wisemapping.dao.MindmapManagerImpl">
|
</bean>
|
||||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
<bean id="mindmapManager" class="com.wisemapping.dao.MindmapManagerImpl">
|
||||||
|
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||||
|
</bean>
|
||||||
|
</beans>
|
||||||
</beans>
|
</beans>
|
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:sec="http://www.springframework.org/schema/security"
|
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"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
http://www.springframework.org/schema/security
|
http://www.springframework.org/schema/security
|
||||||
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
http://www.springframework.org/schema/security/spring-security-3.1.xsd
|
||||||
|
http://www.springframework.org/schema/context
|
||||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
<property name="location" value="/WEB-INF/app.properties"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
<context:property-placeholder location="/WEB-INF/app.properties"/>
|
||||||
|
|
||||||
<bean id="encoder"
|
<bean id="encoder"
|
||||||
class="com.wisemapping.security.CustomPasswordEncoder"/>
|
class="com.wisemapping.security.CustomPasswordEncoder"/>
|
||||||
@ -73,10 +73,8 @@
|
|||||||
<property name="adminUser" value="${admin.user}"/>
|
<property name="adminUser" value="${admin.user}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<beans profile="production">
|
<beans profile="heroku">
|
||||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
<context:property-placeholder location="/WEB-INF/heroku.properties"/>
|
||||||
<property name="location" value="/WEB-INF/prod.properties" />
|
|
||||||
</bean>
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
@ -1,8 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-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 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" scope ="singleton">
|
||||||
<bean id="mailer" class="com.wisemapping.mail.Mailer" singleton="true">
|
|
||||||
<constructor-arg index="0" value="${mail.serverSendEmail}"/>
|
<constructor-arg index="0" value="${mail.serverSendEmail}"/>
|
||||||
<constructor-arg index="1" value="${mail.supportEmail}"/>
|
<constructor-arg index="1" value="${mail.supportEmail}"/>
|
||||||
<constructor-arg index="2" value="${mail.errorReporterEmail}"/>
|
<constructor-arg index="2" value="${mail.errorReporterEmail}"/>
|
||||||
@ -74,7 +76,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</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="baseUrl" value="${site.baseurl}"/>
|
||||||
<property name="mailer" ref="mailer"/>
|
<property name="mailer" ref="mailer"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
@ -14,11 +14,9 @@
|
|||||||
<context:component-scan base-package="com.wisemapping.ncontroller"/>
|
<context:component-scan base-package="com.wisemapping.ncontroller"/>
|
||||||
<context:annotation-config/>
|
<context:annotation-config/>
|
||||||
<mvc:annotation-driven/>
|
<mvc:annotation-driven/>
|
||||||
|
<context:property-placeholder
|
||||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
location="/WEB-INF/app.properties"
|
||||||
<property name="location" value="/WEB-INF/app.properties"/>
|
/>
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Interceptors Registration -->
|
<!-- Interceptors Registration -->
|
||||||
<mvc:interceptors>
|
<mvc:interceptors>
|
||||||
@ -114,8 +112,8 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<beans profile="heroku">
|
<beans profile="heroku">
|
||||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
<context:property-placeholder
|
||||||
<property name="location" value="/WEB-INF/heroku.properties" />
|
location="/WEB-INF/heroku.properties"
|
||||||
</bean>
|
/>
|
||||||
</beans>
|
</beans>
|
||||||
</beans>
|
</beans>
|
||||||
|
Loading…
Reference in New Issue
Block a user