|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<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"> |
| 3 | + <modelVersion>4.0.0</modelVersion> |
| 4 | + |
| 5 | + <name>Klass API</name> |
| 6 | + <description>API for uthenting av kodeverk</description> |
| 7 | + <artifactId>klass-api</artifactId> |
| 8 | + <packaging>war</packaging> |
| 9 | + |
| 10 | + <parent> |
| 11 | + <groupId>no.ssb.klass</groupId> |
| 12 | + <artifactId>klass-root</artifactId> |
| 13 | + <version>4.2.9-SNAPSHOT</version> |
| 14 | + </parent> |
| 15 | + |
| 16 | + <properties> |
| 17 | + <snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory> |
| 18 | + </properties> |
| 19 | + |
| 20 | + |
| 21 | + <dependencies> |
| 22 | + <!--KLASS--> |
| 23 | + <dependency> |
| 24 | + <groupId>no.ssb.klass</groupId> |
| 25 | + <artifactId>klass-shared</artifactId> |
| 26 | + <version>${project.parent.version}</version> |
| 27 | + </dependency> |
| 28 | + |
| 29 | + <!--Spring--> |
| 30 | + <dependency> |
| 31 | + <groupId>org.springframework.boot</groupId> |
| 32 | + <artifactId>spring-boot-starter-web</artifactId> |
| 33 | + </dependency> |
| 34 | + <dependency> |
| 35 | + <groupId>org.springframework.boot</groupId> |
| 36 | + <artifactId>spring-boot-starter-hateoas</artifactId> |
| 37 | + </dependency> |
| 38 | + <dependency> |
| 39 | + <groupId>org.springframework.boot</groupId> |
| 40 | + <artifactId>spring-boot-starter-actuator</artifactId> |
| 41 | + </dependency> |
| 42 | + <dependency> |
| 43 | + <groupId>org.springframework.boot</groupId> |
| 44 | + <artifactId>spring-boot-configuration-processor</artifactId> |
| 45 | + <optional>true</optional> |
| 46 | + </dependency> |
| 47 | + <dependency> |
| 48 | + <groupId>org.springframework.boot</groupId> |
| 49 | + <artifactId>spring-boot-starter-tomcat</artifactId> |
| 50 | + <scope>provided</scope> |
| 51 | + </dependency> |
| 52 | + <dependency> |
| 53 | + <groupId>org.springdoc</groupId> |
| 54 | + <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> |
| 55 | + <version>2.8.14</version> |
| 56 | + </dependency> |
| 57 | + <dependency> |
| 58 | + <groupId>org.opensearch.client</groupId> |
| 59 | + <artifactId>spring-data-opensearch-starter</artifactId> |
| 60 | + <version>1.7.1</version> |
| 61 | + </dependency> |
| 62 | + |
| 63 | + <!--Non-Spring--> |
| 64 | + <dependency> |
| 65 | + <groupId>jakarta.xml.bind</groupId> |
| 66 | + <artifactId>jakarta.xml.bind-api</artifactId> |
| 67 | + <version>${jaxb-api-version}</version> |
| 68 | + </dependency> |
| 69 | + <dependency> |
| 70 | + <groupId>org.glassfish.jaxb</groupId> |
| 71 | + <artifactId>jaxb-runtime</artifactId> |
| 72 | + </dependency> |
| 73 | + <dependency> |
| 74 | + <groupId>org.postgresql</groupId> |
| 75 | + <artifactId>postgresql</artifactId> |
| 76 | + </dependency> |
| 77 | + <dependency> |
| 78 | + <groupId>org.flywaydb</groupId> |
| 79 | + <artifactId>flyway-database-postgresql</artifactId> |
| 80 | + <version>11.20.0</version> |
| 81 | + <scope>runtime</scope> |
| 82 | + </dependency> |
| 83 | + <dependency> |
| 84 | + <groupId>org.flywaydb</groupId> |
| 85 | + <artifactId>flyway-core</artifactId> |
| 86 | + <version>11.20.0</version> |
| 87 | + </dependency> |
| 88 | + <dependency> |
| 89 | + <groupId>ch.qos.logback.access</groupId> |
| 90 | + <artifactId>logback-access-common</artifactId> |
| 91 | + <version>2.0.9</version> |
| 92 | + </dependency> |
| 93 | + <dependency> |
| 94 | + <groupId>ch.qos.logback.access</groupId> |
| 95 | + <artifactId>logback-access-tomcat</artifactId> |
| 96 | + <version>2.0.9</version> |
| 97 | + </dependency> |
| 98 | + <dependency> |
| 99 | + <groupId>net.logstash.logback</groupId> |
| 100 | + <artifactId>logstash-logback-encoder</artifactId> |
| 101 | + <version>9.0</version> |
| 102 | + </dependency> |
| 103 | + <dependency> |
| 104 | + <groupId>org.apache.tomcat.embed</groupId> |
| 105 | + <artifactId>tomcat-embed-jasper</artifactId> |
| 106 | + <scope>provided</scope> |
| 107 | + </dependency> |
| 108 | + <dependency> |
| 109 | + <groupId>com.jayway.jsonpath</groupId> |
| 110 | + <artifactId>json-path</artifactId> |
| 111 | + </dependency> |
| 112 | + <dependency> |
| 113 | + <groupId>jakarta.ws.rs</groupId> |
| 114 | + <artifactId>jakarta.ws.rs-api</artifactId> |
| 115 | + <version>${jakarta-rs-api-version}</version> |
| 116 | + </dependency> |
| 117 | + <dependency> |
| 118 | + <groupId>io.micrometer</groupId> |
| 119 | + <artifactId>micrometer-registry-prometheus</artifactId> |
| 120 | + </dependency> |
| 121 | + |
| 122 | + <!--TEST SCOPE--> |
| 123 | + <dependency> |
| 124 | + <groupId>no.ssb.klass</groupId> |
| 125 | + <artifactId>klass-shared</artifactId> |
| 126 | + <type>test-jar</type> |
| 127 | + <scope>test</scope> |
| 128 | + <version>${project.parent.version}</version> |
| 129 | + </dependency> |
| 130 | + <dependency> |
| 131 | + <groupId>org.springframework.boot</groupId> |
| 132 | + <artifactId>spring-boot-starter-test</artifactId> |
| 133 | + <scope>test</scope> |
| 134 | + </dependency> |
| 135 | + <dependency> |
| 136 | + <groupId>org.springframework.restdocs</groupId> |
| 137 | + <artifactId>spring-restdocs-mockmvc</artifactId> |
| 138 | + <version>${spring-restdocs-version}</version> |
| 139 | + <scope>test</scope> |
| 140 | + <exclusions> |
| 141 | + <exclusion> |
| 142 | + <groupId>org.springframework.restdocs</groupId> |
| 143 | + <artifactId>spring-restdocs-core</artifactId> |
| 144 | + </exclusion> |
| 145 | + </exclusions> |
| 146 | + </dependency> |
| 147 | + <dependency> |
| 148 | + <groupId>org.springframework.restdocs</groupId> |
| 149 | + <artifactId>spring-restdocs-core</artifactId> |
| 150 | + <version>${spring-restdocs-version}</version> |
| 151 | + <scope>test</scope> |
| 152 | + </dependency> |
| 153 | + <dependency> |
| 154 | + <groupId>io.rest-assured</groupId> |
| 155 | + <artifactId>rest-assured</artifactId> |
| 156 | + <scope>test</scope> |
| 157 | + <exclusions> |
| 158 | + <exclusion> |
| 159 | + <!--Conflicts with Spring's logging setup--> |
| 160 | + <groupId>commons-logging</groupId> |
| 161 | + <artifactId>commons-logging</artifactId> |
| 162 | + </exclusion> |
| 163 | + </exclusions> |
| 164 | + </dependency> |
| 165 | + <dependency> |
| 166 | + <groupId>org.springframework</groupId> |
| 167 | + <artifactId>spring-test</artifactId> |
| 168 | + <scope>test</scope> |
| 169 | + </dependency> |
| 170 | + <dependency> |
| 171 | + <groupId>io.zonky.test</groupId> |
| 172 | + <artifactId>embedded-postgres</artifactId> |
| 173 | + <version>${zonky.version}</version> |
| 174 | + <scope>test</scope> |
| 175 | + </dependency> |
| 176 | + <dependency> |
| 177 | + <groupId>io.zonky.test</groupId> |
| 178 | + <artifactId>embedded-database-spring-test</artifactId> |
| 179 | + <version>${zonky.pg.version}</version> |
| 180 | + <scope>test</scope> |
| 181 | + </dependency> |
| 182 | + <dependency> |
| 183 | + <groupId>org.testcontainers</groupId> |
| 184 | + <artifactId>testcontainers</artifactId> |
| 185 | + <version>1.19.8</version> |
| 186 | + <scope>test</scope> |
| 187 | + </dependency> |
| 188 | + <dependency> |
| 189 | + <groupId>org.testcontainers</groupId> |
| 190 | + <artifactId>junit-jupiter</artifactId> |
| 191 | + <version>1.21.4</version> |
| 192 | + <scope>test</scope> |
| 193 | + </dependency> |
| 194 | + <dependency> |
| 195 | + <groupId>org.opensearch</groupId> |
| 196 | + <artifactId>opensearch-testcontainers</artifactId> |
| 197 | + <version>2.0.1</version> |
| 198 | + <scope>test</scope> |
| 199 | + </dependency> |
| 200 | + </dependencies> |
| 201 | + |
| 202 | + <profiles> |
| 203 | + <profile> |
| 204 | + <activation> |
| 205 | + <activeByDefault>true</activeByDefault> |
| 206 | + </activation> |
| 207 | + <id>documentation</id> |
| 208 | + <build> |
| 209 | + <plugins> |
| 210 | + <plugin> |
| 211 | + <groupId>org.springframework.boot</groupId> |
| 212 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 213 | + </plugin> |
| 214 | + <plugin> |
| 215 | + <groupId>org.flywaydb</groupId> |
| 216 | + <artifactId>flyway-maven-plugin</artifactId> |
| 217 | + <version>11.20.0</version> |
| 218 | + </plugin> |
| 219 | + <plugin> |
| 220 | + <groupId>org.apache.maven.plugins</groupId> |
| 221 | + <artifactId>maven-surefire-plugin</artifactId> |
| 222 | + <configuration> |
| 223 | + <argLine>-Dfile.encoding=UTF-8</argLine> |
| 224 | + <includes> |
| 225 | + <include>**/*Tests.java</include> |
| 226 | + <include>**/*Test.java</include> |
| 227 | + <include>**/*Documentation.java</include> |
| 228 | + </includes> |
| 229 | + <excludes> |
| 230 | + <exclude>migration/**</exclude> |
| 231 | + </excludes> |
| 232 | + </configuration> |
| 233 | + </plugin> |
| 234 | + <plugin> |
| 235 | + <groupId>org.asciidoctor</groupId> |
| 236 | + <artifactId>asciidoctor-maven-plugin</artifactId> |
| 237 | + <version>${asciidoctor-version}</version> |
| 238 | + <executions> |
| 239 | + <execution> |
| 240 | + <id>generate-docs</id> |
| 241 | + <phase>prepare-package</phase> |
| 242 | + <goals> |
| 243 | + <goal>process-asciidoc</goal> |
| 244 | + </goals> |
| 245 | + <configuration> |
| 246 | + <backend>html</backend> |
| 247 | + <doctype>book</doctype> |
| 248 | + <attributes> |
| 249 | + <snippets>${snippetsDirectory}</snippets> |
| 250 | + </attributes> |
| 251 | + </configuration> |
| 252 | + </execution> |
| 253 | + </executions> |
| 254 | + </plugin> |
| 255 | + <plugin> |
| 256 | + <artifactId>maven-resources-plugin</artifactId> |
| 257 | + <executions> |
| 258 | + <execution> |
| 259 | + <id>copy-resources-tomcat</id> |
| 260 | + <phase>prepare-package</phase> |
| 261 | + <goals> |
| 262 | + <goal>copy-resources</goal> |
| 263 | + </goals> |
| 264 | + <configuration> |
| 265 | + <!-- COPYING API-GUIDE FOR USE WITH TOMCAT --> |
| 266 | + <outputDirectory> |
| 267 | + ${project.build.outputDirectory}/static/v1 |
| 268 | + </outputDirectory> |
| 269 | + <resources> |
| 270 | + <resource> |
| 271 | + <directory> |
| 272 | + ${project.build.directory}/generated-docs |
| 273 | + </directory> |
| 274 | + </resource> |
| 275 | + </resources> |
| 276 | + </configuration> |
| 277 | + </execution> |
| 278 | + <execution> |
| 279 | + <id>copy-resources-locally</id> |
| 280 | + <phase>prepare-package</phase> |
| 281 | + <goals> |
| 282 | + <goal>copy-resources</goal> |
| 283 | + </goals> |
| 284 | + <configuration> |
| 285 | + <!-- MAKING API-GUIDE AVAILABLE WHEN RUNNING LOCALLY--> |
| 286 | + <outputDirectory> |
| 287 | + ${project.build.outputDirectory}/static/api/klass/v1 |
| 288 | + </outputDirectory> |
| 289 | + <resources> |
| 290 | + <resource> |
| 291 | + <directory> |
| 292 | + ${project.build.directory}/generated-docs |
| 293 | + </directory> |
| 294 | + </resource> |
| 295 | + </resources> |
| 296 | + </configuration> |
| 297 | + </execution> |
| 298 | + </executions> |
| 299 | + </plugin> |
| 300 | + </plugins> |
| 301 | + </build> |
| 302 | + </profile> |
| 303 | + </profiles> |
| 304 | + |
| 305 | + <build> |
| 306 | + <finalName>api#klass-${project.version}</finalName> |
| 307 | + <plugins> |
| 308 | + <plugin> |
| 309 | + <groupId>org.apache.maven.plugins</groupId> |
| 310 | + <artifactId>maven-surefire-plugin</artifactId> |
| 311 | + <configuration> |
| 312 | + <argLine>-Dfile.encoding=UTF-8</argLine> |
| 313 | + </configuration> |
| 314 | + </plugin> |
| 315 | + </plugins> |
| 316 | + </build> |
| 317 | + |
| 318 | +</project> |
0 commit comments