Permalink
Fetching contributors…
Cannot retrieve contributors at this time
171 lines (168 sloc) 7.18 KB
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>it.codingjam</groupId>
<artifactId>todo-list-jaxrs-spring</artifactId>
<version>2.1.1</version>
</parent>
<artifactId>todo-list-jaxrs-spring-web</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>it.codingjam</groupId>
<artifactId>todo-list-jaxrs-spring-services</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-resources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/it/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/it/resources</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>reserve-network-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<portNames>
<portName>tomcat.http.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<systemPropertyVariables>
<integration-test.url>http://localhost:${tomcat.port}/${project.artifactId}
</integration-test.url>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${dmp.version}</version>
<configuration>
<showLogs>true</showLogs>
<images combine.children="append">
<image>
<alias>todolist-tomcat</alias>
<name>%g/todolist-tomcat:%l</name>
<build>
<args>
<POSTGRES_DRV_VER>${postgresql.version}</POSTGRES_DRV_VER>
<ARTIFACT>${project.build.finalName}.${project.packaging}</ARTIFACT>
</args>
<dockerFileDir>${project.basedir}/src/it/resources/docker/tomcat</dockerFileDir>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
</build>
<run>
<ports>
<port>tomcat.port:8080</port>
</ports>
<wait>
<http>
<url>http://localhost:${tomcat.port}</url>
</http>
<time>30000</time>
</wait>
<links>
<link>postgres-integration-test:db</link>
</links>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<!-- "build" should be used to create the images with the
artifact -->
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<warName>${project.artifactId}</warName>
<webResources>
<resource>
<filtering>true</filtering>
<directory>src/main/webapp</directory>
<includes>
<include>**/web.xml</include>
<include>META-INF/**</include>
</includes>
</resource>
</webResources>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
</project>