|
84 | 84 | </repository> |
85 | 85 | </distributionManagement> |
86 | 86 |
|
| 87 | + <dependencyManagement> |
| 88 | + <dependencies> |
| 89 | + <dependency> |
| 90 | + <groupId>com.fasterxml.jackson</groupId> |
| 91 | + <artifactId>jackson-bom</artifactId> |
| 92 | + <version>2.15.0</version> |
| 93 | + <type>pom</type> |
| 94 | + <scope>import</scope> |
| 95 | + </dependency> |
| 96 | + </dependencies> |
| 97 | + </dependencyManagement> |
| 98 | + |
| 99 | + <dependencies> |
| 100 | + <!-- HTTP client: apache client --> |
| 101 | + <dependency> |
| 102 | + <groupId>org.apache.httpcomponents.client5</groupId> |
| 103 | + <artifactId>httpclient5</artifactId> |
| 104 | + <version>5.2.1</version> |
| 105 | + </dependency> |
| 106 | + |
| 107 | + <!-- JSON processing: jackson --> |
| 108 | + <dependency> |
| 109 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 110 | + <artifactId>jackson-core</artifactId> |
| 111 | + </dependency> |
| 112 | + <dependency> |
| 113 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 114 | + <artifactId>jackson-annotations</artifactId> |
| 115 | + </dependency> |
| 116 | + <dependency> |
| 117 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 118 | + <artifactId>jackson-databind</artifactId> |
| 119 | + </dependency> |
| 120 | + <dependency> |
| 121 | + <groupId>com.fasterxml.jackson.jaxrs</groupId> |
| 122 | + <artifactId>jackson-jaxrs-json-provider</artifactId> |
| 123 | + </dependency> |
| 124 | + <dependency> |
| 125 | + <groupId>com.fasterxml.jackson.datatype</groupId> |
| 126 | + <artifactId>jackson-datatype-jsr310</artifactId> |
| 127 | + </dependency> |
| 128 | + <dependency> |
| 129 | + <groupId>org.openapitools</groupId> |
| 130 | + <artifactId>jackson-databind-nullable</artifactId> |
| 131 | + <version>0.2.6</version> |
| 132 | + </dependency> |
| 133 | + |
| 134 | + <dependency> |
| 135 | + <groupId>jakarta.annotation</groupId> |
| 136 | + <artifactId>jakarta.annotation-api</artifactId> |
| 137 | + <version>2.1.1</version> |
| 138 | + </dependency> |
| 139 | + </dependencies> |
| 140 | + |
87 | 141 | <build> |
88 | 142 | <plugins> |
89 | 143 | <plugin> |
|
158 | 212 | </execution> |
159 | 213 | </executions> |
160 | 214 | </plugin> |
| 215 | + |
| 216 | + <plugin> |
| 217 | + <groupId>org.codehaus.mojo</groupId> |
| 218 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 219 | + <version>3.3.0</version> |
| 220 | + <executions> |
| 221 | + <execution> |
| 222 | + <phase>generate-sources</phase> |
| 223 | + <goals> |
| 224 | + <goal>add-source</goal> |
| 225 | + </goals> |
| 226 | + <configuration> |
| 227 | + <sources> |
| 228 | + <source>src/generated/java</source> |
| 229 | + </sources> |
| 230 | + </configuration> |
| 231 | + </execution> |
| 232 | + </executions> |
| 233 | + </plugin> |
161 | 234 | </plugins> |
162 | 235 | </build> |
163 | 236 | <profiles> |
|
204 | 277 | </plugins> |
205 | 278 | </build> |
206 | 279 | </profile> |
| 280 | + <profile> |
| 281 | + <id>openapi-generator</id> |
| 282 | + <properties> |
| 283 | + <basePackage>software.xdev.sessionize</basePackage> |
| 284 | + |
| 285 | + <generatedDir>${project.basedir}/src/generated/java</generatedDir> |
| 286 | + <openApiRelativeGeneratorDir>src/gen</openApiRelativeGeneratorDir> |
| 287 | + <openApiGeneratorDir> |
| 288 | + ${project.basedir}/target/generated-sources/openapi/${openApiRelativeGeneratorDir} |
| 289 | + </openApiGeneratorDir> |
| 290 | + </properties> |
| 291 | + <build> |
| 292 | + <plugins> |
| 293 | + <plugin> |
| 294 | + <groupId>org.openapitools</groupId> |
| 295 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 296 | + <version>6.5.0</version> |
| 297 | + <executions> |
| 298 | + <execution> |
| 299 | + <goals> |
| 300 | + <goal>generate</goal> |
| 301 | + </goals> |
| 302 | + <configuration> |
| 303 | + <inputSpec>${project.basedir}/../openapi/openapi.yml</inputSpec> |
| 304 | + <generatorName>java</generatorName> |
| 305 | + <configOptions> |
| 306 | + <sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder> |
| 307 | + <library>apache-httpclient</library> |
| 308 | + <apiPackage>${basePackage}.api</apiPackage> |
| 309 | + <modelPackage>${basePackage}.model</modelPackage> |
| 310 | + <invokerPackage>${basePackage}.client</invokerPackage> |
| 311 | + <!-- Otherwise throw and catch everywhere --> |
| 312 | + <useRuntimeException>true</useRuntimeException> |
| 313 | + <!-- Some fields of API have been ignored because they are unused --> |
| 314 | + <disallowAdditionalPropertiesIfNotPresent>false |
| 315 | + </disallowAdditionalPropertiesIfNotPresent> |
| 316 | + <!-- Use newer Jakarta EE instead of Javax --> |
| 317 | + <useJakartaEe>true</useJakartaEe> |
| 318 | + <!-- No tests and documentation because we don't use that --> |
| 319 | + <generateModelTests>false</generateModelTests> |
| 320 | + <generateApiTests>false</generateApiTests> |
| 321 | + <generateModelDocumentation>false</generateModelDocumentation> |
| 322 | + <generateApiDocumentation>false</generateApiDocumentation> |
| 323 | + </configOptions> |
| 324 | + </configuration> |
| 325 | + </execution> |
| 326 | + </executions> |
| 327 | + </plugin> |
| 328 | + <plugin> |
| 329 | + <groupId>org.apache.maven.plugins</groupId> |
| 330 | + <artifactId>maven-resources-plugin</artifactId> |
| 331 | + <version>3.3.1</version> |
| 332 | + <executions> |
| 333 | + <execution> |
| 334 | + <id>copy-generated-resources</id> |
| 335 | + <phase>process-resources</phase> |
| 336 | + <goals> |
| 337 | + <goal>copy-resources</goal> |
| 338 | + </goals> |
| 339 | + <configuration> |
| 340 | + <outputDirectory>${generatedDir}</outputDirectory> |
| 341 | + <resources> |
| 342 | + <resource> |
| 343 | + <directory>${openApiGeneratorDir}</directory> |
| 344 | + </resource> |
| 345 | + </resources> |
| 346 | + </configuration> |
| 347 | + </execution> |
| 348 | + </executions> |
| 349 | + </plugin> |
| 350 | + <plugin> |
| 351 | + <groupId>org.apache.maven.plugins</groupId> |
| 352 | + <artifactId>maven-clean-plugin</artifactId> |
| 353 | + <version>3.2.0</version> |
| 354 | + <executions> |
| 355 | + <execution> |
| 356 | + <id>pre-generation-clean</id> |
| 357 | + <phase>initialize</phase> |
| 358 | + <goals> |
| 359 | + <goal>clean</goal> |
| 360 | + </goals> |
| 361 | + <configuration> |
| 362 | + <excludeDefaultDirectories>true</excludeDefaultDirectories> |
| 363 | + <filesets> |
| 364 | + <fileset> |
| 365 | + <directory>${generatedDir}</directory> |
| 366 | + </fileset> |
| 367 | + </filesets> |
| 368 | + </configuration> |
| 369 | + </execution> |
| 370 | + <execution> |
| 371 | + <id>post-generation-clean</id> |
| 372 | + <phase>process-resources</phase> |
| 373 | + <goals> |
| 374 | + <goal>clean</goal> |
| 375 | + </goals> |
| 376 | + </execution> |
| 377 | + </executions> |
| 378 | + </plugin> |
| 379 | + </plugins> |
| 380 | + </build> |
| 381 | + </profile> |
207 | 382 | </profiles> |
208 | 383 | </project> |
0 commit comments