176 lines
5.3 KiB
XML
176 lines
5.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<groupId>pro.taskana</groupId>
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>2.0.2.RELEASE</version>
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
</parent>
|
|
<version>1.0.8-SNAPSHOT</version>
|
|
<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>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
<version>2.0.2.RELEASE</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>pro.taskana</groupId>
|
|
<artifactId>taskana-rest-spring</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>pro.taskana</groupId>
|
|
<artifactId>taskana-rest-spring-base</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.plugin</groupId>
|
|
<artifactId>spring-plugin-core</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>javax.servlet</groupId>
|
|
<artifactId>javax.servlet-api</artifactId>
|
|
<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>
|
|
<!-- Reading properties from file and use then as data source properties
|
|
is a pending improvement of Jboss development team check out -> https://issues.jboss.org/browse/WFMP-70
|
|
That's why we are including postgres connection properties directly in this pom file.
|
|
-->
|
|
<properties>
|
|
<driver-class>org.postgresql.Driver</driver-class>
|
|
<connection-url>jdbc:postgresql://localhost:50102/postgres</connection-url>
|
|
<driver-name>postgresqldriver</driver-name>
|
|
<user-name>postgres</user-name>
|
|
<password>postgres</password>
|
|
<activatedProperties>postgres</activatedProperties>
|
|
</properties>
|
|
</profile>
|
|
</profiles>
|
|
|
|
<build>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.wildfly.plugins</groupId>
|
|
<artifactId>wildfly-maven-plugin</artifactId>
|
|
<version>2.0.0.Final</version>
|
|
<configuration>
|
|
<version>11.0.0.Final</version>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>run-wildfly</id>
|
|
<phase>install</phase>
|
|
<goals>
|
|
<goal>start</goal>
|
|
</goals>
|
|
</execution>
|
|
<!-- Deploy the JDBC library in JBoss -->
|
|
<execution>
|
|
<id>deploy-driver</id>
|
|
<phase>install</phase>
|
|
<configuration>
|
|
<groupId>org.postgresql</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<name>postgresqldriver</name>
|
|
</configuration>
|
|
<goals>
|
|
<goal>deploy-artifact</goal>
|
|
</goals>
|
|
</execution>
|
|
<!-- Add a data source -->
|
|
<execution>
|
|
<id>add-datasource</id>
|
|
<phase>install</phase>
|
|
<configuration>
|
|
<address>subsystem=datasources,data-source=java:/TaskanaDS</address>
|
|
<resources>
|
|
<resource>
|
|
<properties>
|
|
<jndi-name>java:/TaskanaDS</jndi-name>
|
|
<enabled>true</enabled>
|
|
<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>
|
|
</configuration>
|
|
<goals>
|
|
<goal>add-resource</goal>
|
|
</goals>
|
|
</execution>
|
|
<!-- Deploy the application on install -->
|
|
<execution>
|
|
<id>wildfly-deploy</id>
|
|
<phase>install</phase>
|
|
<goals>
|
|
<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>
|
|
<phase>install</phase>
|
|
<goals>
|
|
<goal>shutdown</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project> |