|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<project |
| 4 | + xmlns="http://maven.apache.org/POM/4.0.0" |
| 5 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 6 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 7 | + <modelVersion>4.0.0</modelVersion> |
| 8 | + <groupId>cloud.piranha.guides.webprofile</groupId> |
| 9 | + <artifactId>docker</artifactId> |
| 10 | + <version>1-SNAPSHOT</version> |
| 11 | + <packaging>war</packaging> |
| 12 | + <name>Testing with our container image</name> |
| 13 | + <properties> |
| 14 | + <!-- dependencies --> |
| 15 | + <jakartaee.version>10.0.0</jakartaee.version> |
| 16 | + <junit.version>5.10.0-M1</junit.version> |
| 17 | + <!-- plugins --> |
| 18 | + <docker-maven-plugin.version>0.43.4</docker-maven-plugin.version> |
| 19 | + <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> |
| 20 | + <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> |
| 21 | + <maven-war-plugin.version>3.3.2</maven-war-plugin.version> |
| 22 | + <!-- other --> |
| 23 | + <java.version>21</java.version> |
| 24 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 25 | + </properties> |
| 26 | + <dependencies> |
| 27 | + <dependency> |
| 28 | + <groupId>jakarta.platform</groupId> |
| 29 | + <artifactId>jakarta.jakartaee-web-api</artifactId> |
| 30 | + <version>${jakartaee.version}</version> |
| 31 | + <scope>provided</scope> |
| 32 | + </dependency> |
| 33 | + <dependency> |
| 34 | + <groupId>org.junit.jupiter</groupId> |
| 35 | + <artifactId>junit-jupiter-api</artifactId> |
| 36 | + <version>${junit.version}</version> |
| 37 | + <scope>test</scope> |
| 38 | + </dependency> |
| 39 | + <dependency> |
| 40 | + <groupId>org.junit.jupiter</groupId> |
| 41 | + <artifactId>junit-jupiter-engine</artifactId> |
| 42 | + <version>${junit.version}</version> |
| 43 | + <scope>test</scope> |
| 44 | + </dependency> |
| 45 | + <dependency> |
| 46 | + <groupId>org.junit.jupiter</groupId> |
| 47 | + <artifactId>junit-jupiter-params</artifactId> |
| 48 | + <version>${junit.version}</version> |
| 49 | + <scope>test</scope> |
| 50 | + </dependency> |
| 51 | + </dependencies> |
| 52 | + <build> |
| 53 | + <finalName>image</finalName> |
| 54 | + <plugins> |
| 55 | + <plugin> |
| 56 | + <groupId>io.fabric8</groupId> |
| 57 | + <artifactId>docker-maven-plugin</artifactId> |
| 58 | + <version>${docker-maven-plugin.version}</version> |
| 59 | + <configuration> |
| 60 | + <images> |
| 61 | + <image> |
| 62 | + <alias>ocelot-azure-keyvault</alias> |
| 63 | + <name>ghcr.io/manorrock/ocelot-azure-keyvault:latest</name> |
| 64 | + <build> |
| 65 | + <buildx> |
| 66 | + <platforms> |
| 67 | + <platform>linux/amd64</platform> |
| 68 | + <platform>linux/arm64</platform> |
| 69 | + </platforms> |
| 70 | + </buildx> |
| 71 | + <contextDir>${basedir}</contextDir> |
| 72 | + <dockerFile>src/main/docker/Dockerfile</dockerFile> |
| 73 | + </build> |
| 74 | + <run> |
| 75 | + <ports> |
| 76 | + <port>8080:8080</port> |
| 77 | + </ports> |
| 78 | + <wait> |
| 79 | + <http> |
| 80 | + <url>http://localhost:8080/helloworld.html</url> |
| 81 | + </http> |
| 82 | + <time>20000</time> |
| 83 | + </wait> |
| 84 | + </run> |
| 85 | + </image> |
| 86 | + </images> |
| 87 | + </configuration> |
| 88 | + <executions> |
| 89 | + <execution> |
| 90 | + <id>start</id> |
| 91 | + <phase>pre-integration-test</phase> |
| 92 | + <goals> |
| 93 | + <goal>build</goal> |
| 94 | + <goal>start</goal> |
| 95 | + </goals> |
| 96 | + </execution> |
| 97 | + <execution> |
| 98 | + <id>stop</id> |
| 99 | + <phase>post-integration-test</phase> |
| 100 | + <goals> |
| 101 | + <goal>stop</goal> |
| 102 | + </goals> |
| 103 | + </execution> |
| 104 | + </executions> |
| 105 | + </plugin> |
| 106 | + <plugin> |
| 107 | + <groupId>org.apache.maven.plugins</groupId> |
| 108 | + <artifactId>maven-compiler-plugin</artifactId> |
| 109 | + <version>${maven-compiler-plugin.version}</version> |
| 110 | + <configuration> |
| 111 | + <release>${java.version}</release> |
| 112 | + </configuration> |
| 113 | + </plugin> |
| 114 | + <plugin> |
| 115 | + <groupId>org.apache.maven.plugins</groupId> |
| 116 | + <artifactId>maven-failsafe-plugin</artifactId> |
| 117 | + <version>${maven-failsafe-plugin.version}</version> |
| 118 | + <executions> |
| 119 | + <execution> |
| 120 | + <goals> |
| 121 | + <goal>integration-test</goal> |
| 122 | + <goal>verify</goal> |
| 123 | + </goals> |
| 124 | + </execution> |
| 125 | + </executions> |
| 126 | + </plugin> |
| 127 | + <plugin> |
| 128 | + <groupId>org.apache.maven.plugins</groupId> |
| 129 | + <artifactId>maven-war-plugin</artifactId> |
| 130 | + <version>${maven-war-plugin.version}</version> |
| 131 | + <configuration> |
| 132 | + <failOnMissingWebXml>false</failOnMissingWebXml> |
| 133 | + </configuration> |
| 134 | + </plugin> |
| 135 | + </plugins> |
| 136 | + </build> |
| 137 | +</project> |
0 commit comments