|
5 | 5 | <modelVersion>4.0.0</modelVersion> |
6 | 6 |
|
7 | 7 | <groupId>software.xdev</groupId> |
8 | | - <artifactId>template-placeholder</artifactId> |
9 | | - <version>1.0.0-SNAPSHOT</version> |
| 8 | + <artifactId>bzst-dip-java-client</artifactId> |
| 9 | + <version>2.0.2-SNAPSHOT</version> |
10 | 10 | <packaging>jar</packaging> |
11 | 11 |
|
12 | | - <name>template-placeholder</name> |
13 | | - <description>template-placeholder</description> |
14 | | - <url>https://github.com/xdev-software/template-placeholder</url> |
| 12 | + <name>bzst-dip-java-client</name> |
| 13 | + <description>bzst-dip-java-client</description> |
| 14 | + <url>https://github.com/xdev-software/bzst-dip-java-client</url> |
15 | 15 |
|
16 | 16 | <scm> |
17 | | - <url>https://github.com/xdev-software/template-placeholder</url> |
18 | | - <connection>scm:git:https://github.com/xdev-software/template-placeholder.git</connection> |
| 17 | + <url>https://github.com/xdev-software/bzst-dip-java-client</url> |
| 18 | + <connection>scm:git:https://github.com/xdev-software/bzst-dip-java-client.git</connection> |
19 | 19 | </scm> |
20 | 20 |
|
21 | | - <inceptionYear>2023</inceptionYear> |
| 21 | + <inceptionYear>2024</inceptionYear> |
22 | 22 |
|
23 | 23 | <organization> |
24 | 24 | <name>XDEV Software</name> |
|
47 | 47 |
|
48 | 48 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
49 | 49 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 50 | + |
| 51 | + <jjwt.version>0.12.6</jjwt.version> |
| 52 | + <jackson.version>2.19.0</jackson.version> |
| 53 | + |
| 54 | + <generatedDirRelative>src/generated/java</generatedDirRelative> |
| 55 | + |
| 56 | + <!-- Ignore generated code --> |
| 57 | + <sonar.exclusions> |
| 58 | + src/generated/** |
| 59 | + </sonar.exclusions> |
| 60 | + <junit-jupiter.version>5.12.2</junit-jupiter.version> |
50 | 61 | </properties> |
51 | 62 |
|
| 63 | + <dependencies> |
| 64 | + <dependency> |
| 65 | + <groupId>commons-io</groupId> |
| 66 | + <artifactId>commons-io</artifactId> |
| 67 | + <version>2.19.0</version> |
| 68 | + </dependency> |
| 69 | + <dependency> |
| 70 | + <groupId>jakarta.xml.bind</groupId> |
| 71 | + <artifactId>jakarta.xml.bind-api</artifactId> |
| 72 | + <version>4.0.2</version> |
| 73 | + </dependency> |
| 74 | + <dependency> |
| 75 | + <groupId>com.sun.xml.bind</groupId> |
| 76 | + <artifactId>jaxb-impl</artifactId> |
| 77 | + <version>4.0.5</version> |
| 78 | + </dependency> |
| 79 | + <dependency> |
| 80 | + <groupId>io.jsonwebtoken</groupId> |
| 81 | + <artifactId>jjwt-api</artifactId> |
| 82 | + <version>${jjwt.version}</version> |
| 83 | + </dependency> |
| 84 | + <dependency> |
| 85 | + <groupId>io.jsonwebtoken</groupId> |
| 86 | + <artifactId>jjwt-impl</artifactId> |
| 87 | + <version>${jjwt.version}</version> |
| 88 | + <scope>runtime</scope> |
| 89 | + </dependency> |
| 90 | + <dependency> |
| 91 | + <groupId>io.jsonwebtoken</groupId> |
| 92 | + <artifactId>jjwt-jackson</artifactId> |
| 93 | + <version>${jjwt.version}</version> |
| 94 | + <scope>runtime</scope> |
| 95 | + </dependency> |
| 96 | + <dependency> |
| 97 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 98 | + <artifactId>jackson-databind</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.dataformat</groupId> |
| 108 | + <artifactId>jackson-dataformat-xml</artifactId> |
| 109 | + <version>${jackson.version}</version> |
| 110 | + </dependency> |
| 111 | + <dependency> |
| 112 | + <groupId>com.fasterxml.jackson.datatype</groupId> |
| 113 | + <artifactId>jackson-datatype-jsr310</artifactId> |
| 114 | + <version>${jackson.version}</version> |
| 115 | + </dependency> |
| 116 | + <!-- HTTP client: apache client --> |
| 117 | + <dependency> |
| 118 | + <groupId>org.apache.httpcomponents.client5</groupId> |
| 119 | + <artifactId>httpclient5</artifactId> |
| 120 | + <version>5.4.3</version> |
| 121 | + </dependency> |
| 122 | + <dependency> |
| 123 | + <groupId>org.openapitools</groupId> |
| 124 | + <artifactId>jackson-databind-nullable</artifactId> |
| 125 | + <version>0.2.6</version> |
| 126 | + </dependency> |
| 127 | + <dependency> |
| 128 | + <groupId>org.slf4j</groupId> |
| 129 | + <artifactId>slf4j-api</artifactId> |
| 130 | + <version>2.0.17</version> |
| 131 | + </dependency> |
| 132 | + <dependency> |
| 133 | + <groupId>com.opencsv</groupId> |
| 134 | + <artifactId>opencsv</artifactId> |
| 135 | + <version>5.11</version> |
| 136 | + </dependency> |
| 137 | + |
| 138 | + <dependency> |
| 139 | + <groupId>org.junit.jupiter</groupId> |
| 140 | + <artifactId>junit-jupiter-api</artifactId> |
| 141 | + <version>${junit-jupiter.version}</version> |
| 142 | + <scope>test</scope> |
| 143 | + </dependency> |
| 144 | + <dependency> |
| 145 | + <groupId>org.junit.jupiter</groupId> |
| 146 | + <artifactId>junit-jupiter-params</artifactId> |
| 147 | + <version>${junit-jupiter.version}</version> |
| 148 | + <scope>test</scope> |
| 149 | + </dependency> |
| 150 | + <dependency> |
| 151 | + <groupId>org.apache.logging.log4j</groupId> |
| 152 | + <artifactId>log4j-slf4j2-impl</artifactId> |
| 153 | + <version>2.24.3</version> |
| 154 | + <scope>test</scope> |
| 155 | + </dependency> |
| 156 | + </dependencies> |
| 157 | + |
52 | 158 | <build> |
53 | 159 | <pluginManagement> |
54 | 160 | <plugins> |
|
137 | 243 | </execution> |
138 | 244 | </executions> |
139 | 245 | </plugin> |
| 246 | + <plugin> |
| 247 | + <groupId>org.codehaus.mojo</groupId> |
| 248 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 249 | + <version>3.6.0</version> |
| 250 | + <executions> |
| 251 | + <execution> |
| 252 | + <phase>generate-sources</phase> |
| 253 | + <goals> |
| 254 | + <goal>add-source</goal> |
| 255 | + </goals> |
| 256 | + <configuration> |
| 257 | + <sources> |
| 258 | + <source>${generatedDirRelative}</source> |
| 259 | + </sources> |
| 260 | + </configuration> |
| 261 | + </execution> |
| 262 | + </executions> |
| 263 | + </plugin> |
140 | 264 | </plugins> |
141 | 265 | </build> |
142 | 266 | <profiles> |
|
215 | 339 | <configuration> |
216 | 340 | <configLocation>../.config/checkstyle/checkstyle.xml</configLocation> |
217 | 341 | <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| 342 | + <excludes>**/xmldocument/model/**/*</excludes> |
218 | 343 | </configuration> |
219 | 344 | <executions> |
220 | 345 | <execution> |
|
228 | 353 | </build> |
229 | 354 | </profile> |
230 | 355 | <profile> |
231 | | - <id>pmd</id> |
| 356 | + <id>openapi-generator</id> |
| 357 | + <properties> |
| 358 | + <componentDir>bzst/dip/client/generated</componentDir> |
| 359 | + <componentPackage>bzst.dip.client.generated</componentPackage> |
| 360 | + |
| 361 | + <generatedDir>${project.basedir}/${generatedDirRelative}</generatedDir> |
| 362 | + <openApiRelativeGeneratorDir>src/gen</openApiRelativeGeneratorDir> |
| 363 | + <openApiGeneratorDir> |
| 364 | + ${project.basedir}/target/generated-sources/openapi/${openApiRelativeGeneratorDir} |
| 365 | + </openApiGeneratorDir> |
| 366 | + </properties> |
232 | 367 | <build> |
233 | 368 | <plugins> |
234 | 369 | <plugin> |
235 | 370 | <groupId>org.apache.maven.plugins</groupId> |
| 371 | + <artifactId>maven-clean-plugin</artifactId> |
| 372 | + <version>3.4.1</version> |
| 373 | + <executions> |
| 374 | + <execution> |
| 375 | + <id>pre-generation-clean</id> |
| 376 | + <phase>initialize</phase> |
| 377 | + <goals> |
| 378 | + <goal>clean</goal> |
| 379 | + </goals> |
| 380 | + <configuration> |
| 381 | + <excludeDefaultDirectories>true</excludeDefaultDirectories> |
| 382 | + <filesets> |
| 383 | + <fileset> |
| 384 | + <directory>${generatedDir}</directory> |
| 385 | + </fileset> |
| 386 | + </filesets> |
| 387 | + </configuration> |
| 388 | + </execution> |
| 389 | + <execution> |
| 390 | + <id>post-generation-clean</id> |
| 391 | + <phase>process-resources</phase> |
| 392 | + <goals> |
| 393 | + <goal>clean</goal> |
| 394 | + </goals> |
| 395 | + </execution> |
| 396 | + </executions> |
| 397 | + </plugin> |
| 398 | + <plugin> |
| 399 | + <groupId>org.openapitools</groupId> |
| 400 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 401 | + <version>7.10.0</version> |
| 402 | + <executions> |
| 403 | + <execution> |
| 404 | + <goals> |
| 405 | + <goal>generate</goal> |
| 406 | + </goals> |
| 407 | + <configuration> |
| 408 | + <inputSpec>${project.basedir}/../openapi/openapi.yml</inputSpec> |
| 409 | + <generatorName>java</generatorName> |
| 410 | + <configOptions> |
| 411 | + <sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder> |
| 412 | + <library>apache-httpclient</library> |
| 413 | + <apiPackage>software.xdev.${componentPackage}.api</apiPackage> |
| 414 | + <modelPackage>software.xdev.${componentPackage}.model</modelPackage> |
| 415 | + <invokerPackage>software.xdev.${componentPackage}.client</invokerPackage> |
| 416 | + <!-- Otherwise throw and catch everywhere --> |
| 417 | + <useRuntimeException>true</useRuntimeException> |
| 418 | + <!-- Some fields of API have been ignored because they are unused --> |
| 419 | + <disallowAdditionalPropertiesIfNotPresent>false |
| 420 | + </disallowAdditionalPropertiesIfNotPresent> |
| 421 | + <!-- Use newer Jakarta EE instead of Javax --> |
| 422 | + <useJakartaEe>true</useJakartaEe> |
| 423 | + <hideGenerationTimestamp>true</hideGenerationTimestamp> |
| 424 | + </configOptions> |
| 425 | + <!-- No tests and documentation because we don't use that --> |
| 426 | + <generateModelTests>false</generateModelTests> |
| 427 | + <generateApiTests>false</generateApiTests> |
| 428 | + <generateModelDocumentation>false</generateModelDocumentation> |
| 429 | + <generateApiDocumentation>false</generateApiDocumentation> |
| 430 | + </configuration> |
| 431 | + </execution> |
| 432 | + </executions> |
| 433 | + </plugin> |
| 434 | + <plugin> |
| 435 | + <groupId>org.apache.maven.plugins</groupId> |
| 436 | + <artifactId>maven-resources-plugin</artifactId> |
| 437 | + <version>3.3.1</version> |
| 438 | + <executions> |
| 439 | + <execution> |
| 440 | + <id>copy-generated-resources</id> |
| 441 | + <phase>process-sources</phase> |
| 442 | + <goals> |
| 443 | + <goal>copy-resources</goal> |
| 444 | + </goals> |
| 445 | + <configuration> |
| 446 | + <outputDirectory>${generatedDir}</outputDirectory> |
| 447 | + <resources> |
| 448 | + <resource> |
| 449 | + <directory>${openApiGeneratorDir}</directory> |
| 450 | + </resource> |
| 451 | + </resources> |
| 452 | + </configuration> |
| 453 | + </execution> |
| 454 | + </executions> |
| 455 | + </plugin> |
| 456 | + <plugin> |
| 457 | + <groupId>software.xdev</groupId> |
| 458 | + <artifactId>find-and-replace-maven-plugin</artifactId> |
| 459 | + <version>1.0.3</version> |
| 460 | + <executions> |
| 461 | + <execution> |
| 462 | + <!-- Remove so that we don't need additional dependency --> |
| 463 | + <id>remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</id> |
| 464 | + <phase>process-sources</phase> |
| 465 | + <goals> |
| 466 | + <goal>file-contents</goal> |
| 467 | + </goals> |
| 468 | + <configuration> |
| 469 | + <baseDir>${generatedDirRelative}/software/xdev/${componentDir}/client/</baseDir> |
| 470 | + <fileMask>ApiClient.java</fileMask> |
| 471 | + <!-- @formatter:off DO NOT INTRODUCE LINE BREAK --> |
| 472 | + <findRegex>^import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;(\r?\n)</findRegex> |
| 473 | + <!-- @formatter:on --> |
| 474 | + <replaceLineBased>false</replaceLineBased> |
| 475 | + </configuration> |
| 476 | + </execution> |
| 477 | + <execution> |
| 478 | + <!-- Changes with each generator version --> |
| 479 | + <id>remove-generated-annotation</id> |
| 480 | + <phase>process-sources</phase> |
| 481 | + <goals> |
| 482 | + <goal>file-contents</goal> |
| 483 | + </goals> |
| 484 | + <configuration> |
| 485 | + <baseDir>${generatedDirRelative}/software/xdev/${componentDir}/</baseDir> |
| 486 | + <recursive>true</recursive> |
| 487 | + <fileMask>.java</fileMask> |
| 488 | + <findRegex>^@jakarta\.annotation\.Generated.*(\r?\n)</findRegex> |
| 489 | + <replaceAll>false</replaceAll> |
| 490 | + <replaceLineBased>false</replaceLineBased> |
| 491 | + </configuration> |
| 492 | + </execution> |
| 493 | + <execution> |
| 494 | + <!-- Requiring Java serialization indicates a serious misuse of the API --> |
| 495 | + <id>remove-serialVersionUID</id> |
| 496 | + <phase>process-sources</phase> |
| 497 | + <goals> |
| 498 | + <goal>file-contents</goal> |
| 499 | + </goals> |
| 500 | + <configuration> |
| 501 | + <baseDir>${generatedDirRelative}/software/xdev/${componentDir}/</baseDir> |
| 502 | + <recursive>true</recursive> |
| 503 | + <fileMask>.java</fileMask> |
| 504 | + <findRegex>^.*serialVersionUID.*(\r?\n)(\s*\r?\n)?</findRegex> |
| 505 | + <replaceAll>false</replaceAll> |
| 506 | + <replaceLineBased>false</replaceLineBased> |
| 507 | + </configuration> |
| 508 | + </execution> |
| 509 | + </executions> |
| 510 | + </plugin> |
| 511 | + </plugins> |
| 512 | + </build> |
| 513 | + </profile> |
| 514 | + <profile> |
| 515 | + <id>pmd</id> |
| 516 | + <build> |
| 517 | + <plugins> |
| 518 | + <plugin> |
236 | 519 | <artifactId>maven-pmd-plugin</artifactId> |
237 | 520 | <version>3.26.0</version> |
238 | 521 | <configuration> |
|
241 | 524 | <rulesets> |
242 | 525 | <ruleset>../.config/pmd/ruleset.xml</ruleset> |
243 | 526 | </rulesets> |
| 527 | + <excludes> |
| 528 | + <exclude>**/generated/**/*.java</exclude> |
| 529 | + </excludes> |
244 | 530 | </configuration> |
245 | 531 | <dependencies> |
246 | 532 | <dependency> |
|
0 commit comments