TSK-779 Configure Wildfly for running JBoss with postgres DB
This commit is contained in:
parent
462a8c0d5e
commit
62835449bb
|
@ -117,7 +117,7 @@ SET PROP_FILE=%HOMEPATH%\taskanaUnitTest.properties
|
|||
)
|
||||
|
||||
ECHO jdbcDriver=org.postgresql.Driver > %PROP_FILE%
|
||||
ECHO jdbcUrl=jdbc:postgresql://localhost:50001/postgres >> %PROP_FILE%
|
||||
ECHO jdbcUrl=jdbc:postgresql://localhost:50102/postgres >> %PROP_FILE%
|
||||
ECHO dbUserName=postgres >> %PROP_FILE%
|
||||
ECHO dbPassword=postgres >> %PROP_FILE%
|
||||
ECHO schemaName=taskana >> %PROP_FILE%
|
||||
|
|
|
@ -31,6 +31,9 @@ function main {
|
|||
mvn clean verify -q -f $REL/../lib/ -B
|
||||
mvn clean install -q -f $REL/../rest/ -B
|
||||
mvn clean verify -q -f $REL/../rest/ -B -pl taskana-rest-spring-example -P history.plugin
|
||||
elif [[ "$1" == "POSTGRES_10_4" ]]; then
|
||||
mvn clean verify -q -f $REL/../lib/taskana-core -B
|
||||
mvn clean install -q -f $REL/../rest/ -B -P postgres
|
||||
else
|
||||
mvn clean verify -q -f $REL/../lib/taskana-core -B
|
||||
fi
|
||||
|
|
|
@ -35,6 +35,7 @@ public class SampleDataGenerator {
|
|||
private static final String SQL = "/sql";
|
||||
private static final String TEST_DATA = "/sample-data";
|
||||
private static final String CLEAR = SQL + TEST_DATA + "/clear-db.sql";
|
||||
private static final String CLEAR_HISTORY_EVENTS = SQL + TEST_DATA + "/clear-history-events.sql";
|
||||
private static final String TASK = SQL + TEST_DATA + "/task.sql";
|
||||
private static final String WORKBASKET = SQL + TEST_DATA + "/workbasket.sql";
|
||||
private static final String DISTRIBUTION_TARGETS = SQL + TEST_DATA + "/distribution-targets.sql";
|
||||
|
@ -73,6 +74,8 @@ public class SampleDataGenerator {
|
|||
runner.setStopOnError(false);
|
||||
runner.runScript(new BufferedReader(
|
||||
new InputStreamReader(this.getClass().getResourceAsStream(CLEAR), StandardCharsets.UTF_8)));
|
||||
runner.runScript(new BufferedReader(
|
||||
new InputStreamReader(this.getClass().getResourceAsStream(CLEAR_HISTORY_EVENTS), StandardCharsets.UTF_8)));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("caught Exception {}", e);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ DELETE FROM WORKBASKET;
|
|||
DELETE FROM DISTRIBUTION_TARGETS;
|
||||
DELETE FROM CLASSIFICATION;
|
||||
DELETE FROM OBJECT_REFERENCE;
|
||||
DELETE FROM HISTORY_EVENTS;
|
||||
-- do not clean JOB table
|
||||
-- DELETE FROM SCHEDULED_JOB;
|
||||
COMMIT;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
DELETE FROM HISTORY_EVENTS;
|
||||
COMMIT;
|
|
@ -13,6 +13,14 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-rest-spring-wildfly-example</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<properties>
|
||||
<!-- Default H2 DB configuration -->
|
||||
<connection-url>jdbc:h2:mem:taskana;IGNORECASE=TRUE;LOCK_MODE=0</connection-url>
|
||||
<driver-class>org.h2.Driver</driver-class>
|
||||
<driver-name>h2</driver-name>
|
||||
<user-name>sa</user-name>
|
||||
<password>sa</password>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -45,8 +53,59 @@
|
|||
<version>3.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>postgres</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>properties-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>read-project-properties</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<properties>
|
||||
<driver-class>${jdbcDriver}</driver-class>
|
||||
<connection-url>${jdbcUrl}</connection-url>
|
||||
<driver-name>postgresqldriver</driver-name>
|
||||
<user-name>${dbUserName}</user-name>
|
||||
<password>${dbPassword}</password>
|
||||
<activatedProperties>postgres</activatedProperties>
|
||||
</properties>
|
||||
<files>
|
||||
<file>${user.home}/taskanaUnitTest.properties</file>
|
||||
</files>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -67,19 +126,19 @@
|
|||
<goal>start</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<!-- Deploy the JDBC library -->
|
||||
<!--<execution>
|
||||
<!-- Deploy the JDBC library in JBoss -->
|
||||
<execution>
|
||||
<id>deploy-driver</id>
|
||||
<phase>install</phase>
|
||||
<configuration>
|
||||
<groupId>postgresql</groupId>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<name>postgresql.jar</name>
|
||||
<name>postgresqldriver</name>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>deploy-artifact</goal>
|
||||
</goals>
|
||||
</execution>-->
|
||||
</execution>
|
||||
<!-- Add a data source -->
|
||||
<execution>
|
||||
<id>add-datasource</id>
|
||||
|
@ -91,11 +150,11 @@
|
|||
<properties>
|
||||
<jndi-name>java:/TaskanaDS</jndi-name>
|
||||
<enabled>true</enabled>
|
||||
<connection-url>jdbc:h2:mem:taskana;IGNORECASE=TRUE;LOCK_MODE=0</connection-url>
|
||||
<driver-class>org.h2.Driver</driver-class>
|
||||
<driver-name>h2</driver-name>
|
||||
<user-name>sa</user-name>
|
||||
<password>sa</password>
|
||||
<connection-url>${connection-url}</connection-url>
|
||||
<driver-class>${driver-class}</driver-class>
|
||||
<driver-name>${driver-name}</driver-name>
|
||||
<user-name>${user-name}</user-name>
|
||||
<password>${password}</password>
|
||||
</properties>
|
||||
</resource>
|
||||
</resources>
|
||||
|
@ -112,6 +171,14 @@
|
|||
<goal>deploy</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<!-- undeploy the application on install -->
|
||||
<execution>
|
||||
<id>wildfly-undeploy</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>undeploy</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<!-- shutdown the application on install -->
|
||||
<execution>
|
||||
<id>wildfly-shutdown</id>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
logging.level.pro.taskana=INFO
|
||||
### logging.level.org.springframework=DEBUG
|
||||
######## Taskana DB #######
|
||||
datasource.jndi=java:/TaskanaDS
|
||||
taskana.schemaName=taskana
|
||||
|
||||
####### control LDAP usage
|
||||
taskana.ldap.useLdap=false
|
||||
####### properties to connect to LDAP
|
||||
taskana.ldap.serverUrl=ldap://localhost:10389
|
||||
taskana.ldap.bindDn=uid=admin,ou=system
|
||||
taskana.ldap.bindPassword=secret
|
||||
taskana.ldap.baseDn=o=TaskanaTest
|
||||
####### properties that control search for users and groups
|
||||
taskana.ldap.userSearchBase=ou=people
|
||||
taskana.ldap.userSearchFilterName=objectclass
|
||||
taskana.ldap.userSearchFilterValue=person
|
||||
taskana.ldap.userFirstnameAttribute=givenName
|
||||
taskana.ldap.userLastnameAttribute=sn
|
||||
taskana.ldap.userIdAttribute=uid
|
||||
taskana.ldap.groupSearchBase=ou=groups
|
||||
taskana.ldap.groupSearchFilterName=objectclass
|
||||
taskana.ldap.groupSearchFilterValue=groupOfUniqueNames
|
||||
taskana.ldap.groupNameAttribute=cn
|
||||
taskana.ldap.minSearchForLength=3
|
||||
taskana.ldap.maxNumberOfReturnedAccessIds=50
|
||||
taskana.ldap.groupsOfUser=memberUid
|
||||
####### JobScheduler cron expression that specifies when the JobSchedler runs
|
||||
taskana.jobscheduler.async.cron=0 * * * * *
|
||||
####### cache static resources properties
|
||||
spring.resources.cache.cachecontrol.cache-private=true
|
||||
####### tomcat is not detecting the x-forward headers from bluemix as a trustworthy proxy
|
||||
server.tomcat.internal-proxies=.*
|
||||
server.use-forward-headers=true
|
|
@ -1,18 +1,9 @@
|
|||
spring.profiles.active=@activatedProperties@
|
||||
logging.level.pro.taskana=INFO
|
||||
### logging.level.org.springframework=DEBUG
|
||||
######## Taskana DB #######
|
||||
######## h2 configuration ########
|
||||
datasource.jndi=java:/TaskanaDS
|
||||
taskana.schemaName=TASKANA
|
||||
######## h2 console configuration ########
|
||||
######## spring.h2.console.enabled=true ########
|
||||
######## spring.h2.console.path=/h2-console ########
|
||||
|
||||
######## Postgres configuration ########
|
||||
######## datasource.url=jdbc:postgresql://localhost/taskana ########
|
||||
######## datasource.driverClassName=org.postgresql.Driver ########
|
||||
######## datasource.username=postgres ########
|
||||
######## datasource.password=1234 ########
|
||||
|
||||
####### control LDAP usage
|
||||
taskana.ldap.useLdap=false
|
||||
|
|
Loading…
Reference in New Issue