|
| 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 | + <artifactId>cdoc2-client</artifactId> |
| 6 | + <groupId>ee.cyber.cdoc2</groupId> |
| 7 | + <version>1.3.0-SNAPSHOT</version> |
| 8 | + <description>CDOC2 server client generation from openapi specification</description> |
| 9 | + |
| 10 | + <properties> |
| 11 | + <logback-classic.version>1.4.14</logback-classic.version> |
| 12 | + <jersey.version>3.1.6</jersey.version> |
| 13 | + <jackson.version>2.15.4</jackson.version> |
| 14 | + <jackson-databind-nullable.version>0.2.6</jackson-databind-nullable.version> |
| 15 | + |
| 16 | + <spotbugs-annotations.version>4.7.3</spotbugs-annotations.version> |
| 17 | + <!--info.version from cdoc2-openapi/cdoc2-key-capsules-openapi.yaml --> |
| 18 | + <cdoc2-key-capsules-openapi.version>2.0.0</cdoc2-key-capsules-openapi.version> |
| 19 | + </properties> |
| 20 | + |
| 21 | + <repositories> |
| 22 | + <repository> |
| 23 | + <id>gitlab.ext.cyber.ee</id> |
| 24 | + <url>https://gitlab.ext.cyber.ee/api/v4/projects/39/packages/maven</url> |
| 25 | + </repository> |
| 26 | + </repositories> |
| 27 | + |
| 28 | + <distributionManagement> |
| 29 | + <repository> |
| 30 | + <id>gitlab.ext.cyber.ee</id> |
| 31 | + <url>https://gitlab.ext.cyber.ee/api/v4/projects/40/packages/maven</url> |
| 32 | + </repository> |
| 33 | + |
| 34 | + <snapshotRepository> |
| 35 | + <id>gitlab.ext.cyber.ee</id> |
| 36 | + <url>https://gitlab.ext.cyber.ee/api/v4/projects/40/packages/maven</url> |
| 37 | + </snapshotRepository> |
| 38 | + </distributionManagement> |
| 39 | + |
| 40 | + |
| 41 | + <dependencies> |
| 42 | + <dependency> |
| 43 | + <groupId>ch.qos.logback</groupId> |
| 44 | + <artifactId>logback-classic</artifactId> |
| 45 | + <version>${logback-classic.version}</version> |
| 46 | + </dependency> |
| 47 | + |
| 48 | + <!-- javax.annotation.Nonnull and friends used by jersey3 client--> |
| 49 | + <!-- no longer required for client, but lib depends on it yet. Move to lib with client move --> |
| 50 | + <!-- remove, and add jakarta-annotation, and start using jakarta.annotation.Nullable instead --> |
| 51 | + <dependency> |
| 52 | + <groupId>com.github.spotbugs</groupId> |
| 53 | + <artifactId>spotbugs-annotations</artifactId> |
| 54 | + <version>${spotbugs-annotations.version}</version> |
| 55 | + <scope>compile</scope> |
| 56 | + </dependency> |
| 57 | + |
| 58 | + <dependency> |
| 59 | + <groupId>org.glassfish.jersey.core</groupId> |
| 60 | + <artifactId>jersey-common</artifactId> |
| 61 | + <version>${jersey.version}</version> |
| 62 | + </dependency> |
| 63 | + |
| 64 | + <dependency> |
| 65 | + <groupId>org.glassfish.jersey.core</groupId> |
| 66 | + <artifactId>jersey-client</artifactId> |
| 67 | + <version>${jersey.version}</version> |
| 68 | + </dependency> |
| 69 | + <dependency> |
| 70 | + <groupId>org.glassfish.jersey.media</groupId> |
| 71 | + <artifactId>jersey-media-multipart</artifactId> |
| 72 | + <version>${jersey.version}</version> |
| 73 | + </dependency> |
| 74 | + <dependency> |
| 75 | + <groupId>org.glassfish.jersey.media</groupId> |
| 76 | + <artifactId>jersey-media-json-jackson</artifactId> |
| 77 | + <version>${jersey.version}</version> |
| 78 | + </dependency> |
| 79 | + <!-- required from 2.26 or jersey2 clients fail without it runtime--> |
| 80 | + <dependency> |
| 81 | + <groupId>org.glassfish.jersey.inject</groupId> |
| 82 | + <artifactId>jersey-hk2</artifactId> |
| 83 | + <version>${jersey.version}</version> |
| 84 | + </dependency> |
| 85 | + <!-- required by jersey-hk2 when running on jdk11+ --> |
| 86 | + <dependency> |
| 87 | + <groupId>javax.xml.bind</groupId> |
| 88 | + <artifactId>jaxb-api</artifactId> |
| 89 | + <version>2.3.1</version> |
| 90 | + </dependency> |
| 91 | + <dependency> |
| 92 | + <groupId>com.fasterxml.jackson.jaxrs</groupId> |
| 93 | + <artifactId>jackson-jaxrs-base</artifactId> |
| 94 | + <version>${jackson.version}</version> |
| 95 | + </dependency> |
| 96 | + <dependency> |
| 97 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 98 | + <artifactId>jackson-core</artifactId> |
| 99 | + <version>${jackson.version}</version> |
| 100 | + </dependency> |
| 101 | + <dependency> |
| 102 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 103 | + <artifactId>jackson-annotations</artifactId> |
| 104 | + <version>${jackson.version}</version> |
| 105 | + </dependency> |
| 106 | + <dependency> |
| 107 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 108 | + <artifactId>jackson-databind</artifactId> |
| 109 | + <version>${jackson.version}</version> |
| 110 | + </dependency> |
| 111 | + <dependency> |
| 112 | + <groupId>com.fasterxml.jackson.jaxrs</groupId> |
| 113 | + <artifactId>jackson-jaxrs-json-provider</artifactId> |
| 114 | + <version>${jackson.version}</version> |
| 115 | + </dependency> |
| 116 | + <dependency> |
| 117 | + <groupId>com.fasterxml.jackson.datatype</groupId> |
| 118 | + <artifactId>jackson-datatype-joda</artifactId> |
| 119 | + <version>${jackson.version}</version> |
| 120 | + </dependency> |
| 121 | + <dependency> |
| 122 | + <groupId>com.fasterxml.jackson.datatype</groupId> |
| 123 | + <artifactId>jackson-datatype-jsr310</artifactId> |
| 124 | + <version>${jackson.version}</version> |
| 125 | + </dependency> |
| 126 | + |
| 127 | + <dependency> |
| 128 | + <groupId>org.openapitools</groupId> |
| 129 | + <artifactId>jackson-databind-nullable</artifactId> |
| 130 | + <version>${jackson-databind-nullable.version}</version> |
| 131 | + </dependency> |
| 132 | + </dependencies> |
| 133 | + |
| 134 | + <build> |
| 135 | + <plugins> |
| 136 | + <plugin> |
| 137 | + <artifactId>maven-dependency-plugin</artifactId> |
| 138 | + <version>3.6.1</version> |
| 139 | + <executions> |
| 140 | + |
| 141 | + <!-- download openapi yaml using dependency::get --> |
| 142 | + <!-- Can be also done using by defining cdoc2-key-capsules-openapi as dependency, --> |
| 143 | + <!-- but that breaks maven-shade plugin as it cannot handle non jar artifacts --> |
| 144 | + <execution> |
| 145 | + <id>download-cdoc2-key-capsules-openapi-yaml</id> |
| 146 | + <phase>generate-sources</phase> |
| 147 | + <goals> |
| 148 | + <goal>get</goal> |
| 149 | + </goals> |
| 150 | + <configuration> |
| 151 | + <groupId>ee.cyber.cdoc2.openapi</groupId> |
| 152 | + <artifactId>cdoc2-key-capsules-openapi</artifactId> |
| 153 | + <version>${cdoc2-key-capsules-openapi.version}</version> |
| 154 | + <packaging>yaml</packaging> |
| 155 | + <!-- can be removed when copied to cdoc2-java-ref-impl repo --> |
| 156 | + <remoteRepositories>gitlab.ext.cyber.ee::::https://gitlab.ext.cyber.ee/api/v4/projects/39/packages/maven</remoteRepositories> |
| 157 | + </configuration> |
| 158 | + </execution> |
| 159 | + |
| 160 | + <execution> |
| 161 | + <id>copy-cdoc2-key-capsules-openapi-yaml</id> |
| 162 | + <phase>generate-sources</phase> |
| 163 | + <goals> |
| 164 | + <goal>copy</goal> |
| 165 | + </goals> |
| 166 | + <configuration> |
| 167 | + <artifactItems> |
| 168 | + <artifactItem> |
| 169 | + <groupId>ee.cyber.cdoc2.openapi</groupId> |
| 170 | + <artifactId>cdoc2-key-capsules-openapi</artifactId> |
| 171 | + <version>${cdoc2-key-capsules-openapi.version}</version> |
| 172 | + <type>yaml</type> |
| 173 | + <outputDirectory>${project.build.directory}/openapi</outputDirectory> |
| 174 | + </artifactItem> |
| 175 | + </artifactItems> |
| 176 | + </configuration> |
| 177 | + </execution> |
| 178 | + </executions> |
| 179 | + </plugin> |
| 180 | + |
| 181 | + <plugin> |
| 182 | + <groupId>org.openapitools</groupId> |
| 183 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 184 | + <version>7.5.0</version> |
| 185 | + <executions> |
| 186 | + <execution> |
| 187 | + <id>generate-key-capsules-api-client</id> |
| 188 | + <goals> |
| 189 | + <goal>generate</goal> |
| 190 | + </goals> |
| 191 | + <configuration> |
| 192 | + <configOptions> |
| 193 | + <useSpringBoot3>true</useSpringBoot3> |
| 194 | + </configOptions> |
| 195 | + <!-- copied by maven-dependency-plugin --> |
| 196 | + <inputSpec>${project.build.directory}/openapi/cdoc2-key-capsules-openapi-${cdoc2-key-capsules-openapi.version}.yaml</inputSpec> |
| 197 | + </configuration> |
| 198 | + </execution> |
| 199 | + </executions> |
| 200 | + |
| 201 | + <configuration> |
| 202 | + <generatorName>java</generatorName> |
| 203 | + <library>jersey3</library> |
| 204 | + <apiPackage>ee.cyber.cdoc2.client.api</apiPackage> |
| 205 | + <modelPackage>ee.cyber.cdoc2.client.model</modelPackage> |
| 206 | + <invokerPackage>ee.cyber.cdoc2.client.api</invokerPackage> |
| 207 | + <generateSupportingFiles>true</generateSupportingFiles> |
| 208 | + <generateApiTests>false</generateApiTests> |
| 209 | + <generateModelTests>false</generateModelTests> |
| 210 | + <configOptions> |
| 211 | + <delegatePattern>false</delegatePattern> |
| 212 | + <!--dateLibrary>java8-localdatetime</dateLibrary--> |
| 213 | + <dateLibrary>java8</dateLibrary> |
| 214 | + <enumUnknownDefaultCase>true</enumUnknownDefaultCase> |
| 215 | + <oas3>true</oas3> |
| 216 | + <useOptional>true</useOptional> |
| 217 | + <bigDecimalAsString>true</bigDecimalAsString> |
| 218 | + <legacyDiscriminatorBehavior>false</legacyDiscriminatorBehavior> |
| 219 | + </configOptions> |
| 220 | + |
| 221 | + <typeMappings> |
| 222 | + <typeMapping>duration=Duration</typeMapping> |
| 223 | + </typeMappings> |
| 224 | + <importMappings>Duration=java.time.Duration</importMappings> |
| 225 | + </configuration> |
| 226 | + |
| 227 | + </plugin> |
| 228 | + |
| 229 | + <plugin> |
| 230 | + <groupId>org.apache.maven.plugins</groupId> |
| 231 | + <artifactId>maven-compiler-plugin</artifactId> |
| 232 | + <version>3.13.0</version> |
| 233 | + <configuration> |
| 234 | + <source>17</source> |
| 235 | + <target>17</target> |
| 236 | + <proc>none</proc> |
| 237 | + </configuration> |
| 238 | + </plugin> |
| 239 | + </plugins> |
| 240 | + </build> |
| 241 | + |
| 242 | +</project> |
0 commit comments