|
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.1-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 | 21 | <inceptionYear>2023</inceptionYear> |
|
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.18.2</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 |
|
52 | 63 | <repositories> |
|
61 | 72 | </repository> |
62 | 73 | </repositories> |
63 | 74 |
|
| 75 | + <dependencies> |
| 76 | + <dependency> |
| 77 | + <groupId>commons-io</groupId> |
| 78 | + <artifactId>commons-io</artifactId> |
| 79 | + <version>2.18.0</version> |
| 80 | + </dependency> |
| 81 | + <dependency> |
| 82 | + <groupId>jakarta.xml.bind</groupId> |
| 83 | + <artifactId>jakarta.xml.bind-api</artifactId> |
| 84 | + <version>4.0.2</version> |
| 85 | + </dependency> |
| 86 | + <dependency> |
| 87 | + <groupId>com.sun.xml.bind</groupId> |
| 88 | + <artifactId>jaxb-impl</artifactId> |
| 89 | + <version>4.0.5</version> |
| 90 | + </dependency> |
| 91 | + <dependency> |
| 92 | + <groupId>io.jsonwebtoken</groupId> |
| 93 | + <artifactId>jjwt-api</artifactId> |
| 94 | + <version>${jjwt.version}</version> |
| 95 | + </dependency> |
| 96 | + <dependency> |
| 97 | + <groupId>io.jsonwebtoken</groupId> |
| 98 | + <artifactId>jjwt-impl</artifactId> |
| 99 | + <version>${jjwt.version}</version> |
| 100 | + <scope>runtime</scope> |
| 101 | + </dependency> |
| 102 | + <dependency> |
| 103 | + <groupId>io.jsonwebtoken</groupId> |
| 104 | + <artifactId>jjwt-jackson</artifactId> |
| 105 | + <version>${jjwt.version}</version> |
| 106 | + <scope>runtime</scope> |
| 107 | + </dependency> |
| 108 | + <dependency> |
| 109 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 110 | + <artifactId>jackson-databind</artifactId> |
| 111 | + <version>${jackson.version}</version> |
| 112 | + </dependency> |
| 113 | + <dependency> |
| 114 | + <groupId>com.fasterxml.jackson.core</groupId> |
| 115 | + <artifactId>jackson-annotations</artifactId> |
| 116 | + <version>${jackson.version}</version> |
| 117 | + </dependency> |
| 118 | + <dependency> |
| 119 | + <groupId>com.fasterxml.jackson.dataformat</groupId> |
| 120 | + <artifactId>jackson-dataformat-xml</artifactId> |
| 121 | + <version>${jackson.version}</version> |
| 122 | + </dependency> |
| 123 | + <dependency> |
| 124 | + <groupId>com.fasterxml.jackson.datatype</groupId> |
| 125 | + <artifactId>jackson-datatype-jsr310</artifactId> |
| 126 | + <version>${jackson.version}</version> |
| 127 | + </dependency> |
| 128 | + <!-- HTTP client: apache client --> |
| 129 | + <dependency> |
| 130 | + <groupId>org.apache.httpcomponents.client5</groupId> |
| 131 | + <artifactId>httpclient5</artifactId> |
| 132 | + <version>5.4.1</version> |
| 133 | + </dependency> |
| 134 | + <dependency> |
| 135 | + <groupId>org.openapitools</groupId> |
| 136 | + <artifactId>jackson-databind-nullable</artifactId> |
| 137 | + <version>0.2.6</version> |
| 138 | + </dependency> |
| 139 | + <dependency> |
| 140 | + <groupId>org.slf4j</groupId> |
| 141 | + <artifactId>slf4j-api</artifactId> |
| 142 | + <version>2.0.16</version> |
| 143 | + </dependency> |
| 144 | + <dependency> |
| 145 | + <groupId>com.opencsv</groupId> |
| 146 | + <artifactId>opencsv</artifactId> |
| 147 | + <version>5.10</version> |
| 148 | + </dependency> |
| 149 | + |
| 150 | + <dependency> |
| 151 | + <groupId>org.junit.jupiter</groupId> |
| 152 | + <artifactId>junit-jupiter-api</artifactId> |
| 153 | + <version>${junit-jupiter.version}</version> |
| 154 | + <scope>test</scope> |
| 155 | + </dependency> |
| 156 | + <dependency> |
| 157 | + <groupId>org.junit.jupiter</groupId> |
| 158 | + <artifactId>junit-jupiter-params</artifactId> |
| 159 | + <version>${junit-jupiter.version}</version> |
| 160 | + <scope>test</scope> |
| 161 | + </dependency> |
| 162 | + <dependency> |
| 163 | + <groupId>org.apache.logging.log4j</groupId> |
| 164 | + <artifactId>log4j-slf4j2-impl</artifactId> |
| 165 | + <version>2.24.3</version> |
| 166 | + <scope>test</scope> |
| 167 | + </dependency> |
| 168 | + </dependencies> |
| 169 | + |
64 | 170 | <pluginRepositories> |
65 | 171 | <!-- The order of definitions matters. Explicitly defining central here |
66 | 172 | to make sure it has the highest priority. --> |
|
172 | 278 | </execution> |
173 | 279 | </executions> |
174 | 280 | </plugin> |
| 281 | + <plugin> |
| 282 | + <groupId>org.codehaus.mojo</groupId> |
| 283 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 284 | + <version>3.6.0</version> |
| 285 | + <executions> |
| 286 | + <execution> |
| 287 | + <phase>generate-sources</phase> |
| 288 | + <goals> |
| 289 | + <goal>add-source</goal> |
| 290 | + </goals> |
| 291 | + <configuration> |
| 292 | + <sources> |
| 293 | + <source>${generatedDirRelative}</source> |
| 294 | + </sources> |
| 295 | + </configuration> |
| 296 | + </execution> |
| 297 | + </executions> |
| 298 | + </plugin> |
175 | 299 | </plugins> |
176 | 300 | </build> |
177 | 301 | <profiles> |
|
253 | 377 | <configuration> |
254 | 378 | <configLocation>../.config/checkstyle/checkstyle.xml</configLocation> |
255 | 379 | <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| 380 | + <excludes>**/xmldocument/model/**/*</excludes> |
256 | 381 | </configuration> |
257 | 382 | <executions> |
258 | 383 | <execution> |
|
266 | 391 | </build> |
267 | 392 | </profile> |
268 | 393 | <profile> |
269 | | - <id>pmd</id> |
| 394 | + <id>openapi-generator</id> |
| 395 | + <properties> |
| 396 | + <componentDir>bzst/dip/client/generated</componentDir> |
| 397 | + <componentPackage>bzst.dip.client.generated</componentPackage> |
| 398 | + |
| 399 | + <generatedDir>${project.basedir}/${generatedDirRelative}</generatedDir> |
| 400 | + <openApiRelativeGeneratorDir>src/gen</openApiRelativeGeneratorDir> |
| 401 | + <openApiGeneratorDir> |
| 402 | + ${project.basedir}/target/generated-sources/openapi/${openApiRelativeGeneratorDir} |
| 403 | + </openApiGeneratorDir> |
| 404 | + </properties> |
270 | 405 | <build> |
271 | 406 | <plugins> |
272 | 407 | <plugin> |
273 | 408 | <groupId>org.apache.maven.plugins</groupId> |
| 409 | + <artifactId>maven-clean-plugin</artifactId> |
| 410 | + <version>3.4.0</version> |
| 411 | + <executions> |
| 412 | + <execution> |
| 413 | + <id>pre-generation-clean</id> |
| 414 | + <phase>initialize</phase> |
| 415 | + <goals> |
| 416 | + <goal>clean</goal> |
| 417 | + </goals> |
| 418 | + <configuration> |
| 419 | + <excludeDefaultDirectories>true</excludeDefaultDirectories> |
| 420 | + <filesets> |
| 421 | + <fileset> |
| 422 | + <directory>${generatedDir}</directory> |
| 423 | + </fileset> |
| 424 | + </filesets> |
| 425 | + </configuration> |
| 426 | + </execution> |
| 427 | + <execution> |
| 428 | + <id>post-generation-clean</id> |
| 429 | + <phase>process-resources</phase> |
| 430 | + <goals> |
| 431 | + <goal>clean</goal> |
| 432 | + </goals> |
| 433 | + </execution> |
| 434 | + </executions> |
| 435 | + </plugin> |
| 436 | + <plugin> |
| 437 | + <groupId>org.openapitools</groupId> |
| 438 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 439 | + <version>7.10.0</version> |
| 440 | + <executions> |
| 441 | + <execution> |
| 442 | + <goals> |
| 443 | + <goal>generate</goal> |
| 444 | + </goals> |
| 445 | + <configuration> |
| 446 | + <inputSpec>${project.basedir}/../openapi/openapi.yml</inputSpec> |
| 447 | + <generatorName>java</generatorName> |
| 448 | + <configOptions> |
| 449 | + <sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder> |
| 450 | + <library>apache-httpclient</library> |
| 451 | + <apiPackage>software.xdev.${componentPackage}.api</apiPackage> |
| 452 | + <modelPackage>software.xdev.${componentPackage}.model</modelPackage> |
| 453 | + <invokerPackage>software.xdev.${componentPackage}.client</invokerPackage> |
| 454 | + <!-- Otherwise throw and catch everywhere --> |
| 455 | + <useRuntimeException>true</useRuntimeException> |
| 456 | + <!-- Some fields of API have been ignored because they are unused --> |
| 457 | + <disallowAdditionalPropertiesIfNotPresent>false |
| 458 | + </disallowAdditionalPropertiesIfNotPresent> |
| 459 | + <!-- Use newer Jakarta EE instead of Javax --> |
| 460 | + <useJakartaEe>true</useJakartaEe> |
| 461 | + <hideGenerationTimestamp>true</hideGenerationTimestamp> |
| 462 | + </configOptions> |
| 463 | + <!-- No tests and documentation because we don't use that --> |
| 464 | + <generateModelTests>false</generateModelTests> |
| 465 | + <generateApiTests>false</generateApiTests> |
| 466 | + <generateModelDocumentation>false</generateModelDocumentation> |
| 467 | + <generateApiDocumentation>false</generateApiDocumentation> |
| 468 | + </configuration> |
| 469 | + </execution> |
| 470 | + </executions> |
| 471 | + </plugin> |
| 472 | + <plugin> |
| 473 | + <groupId>org.apache.maven.plugins</groupId> |
| 474 | + <artifactId>maven-resources-plugin</artifactId> |
| 475 | + <version>3.3.1</version> |
| 476 | + <executions> |
| 477 | + <execution> |
| 478 | + <id>copy-generated-resources</id> |
| 479 | + <phase>process-sources</phase> |
| 480 | + <goals> |
| 481 | + <goal>copy-resources</goal> |
| 482 | + </goals> |
| 483 | + <configuration> |
| 484 | + <outputDirectory>${generatedDir}</outputDirectory> |
| 485 | + <resources> |
| 486 | + <resource> |
| 487 | + <directory>${openApiGeneratorDir}</directory> |
| 488 | + </resource> |
| 489 | + </resources> |
| 490 | + </configuration> |
| 491 | + </execution> |
| 492 | + </executions> |
| 493 | + </plugin> |
| 494 | + <plugin> |
| 495 | + <groupId>software.xdev</groupId> |
| 496 | + <artifactId>find-and-replace-maven-plugin</artifactId> |
| 497 | + <version>1.0.3</version> |
| 498 | + <executions> |
| 499 | + <execution> |
| 500 | + <!-- Remove so that we don't need additional dependency --> |
| 501 | + <id>remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</id> |
| 502 | + <phase>process-sources</phase> |
| 503 | + <goals> |
| 504 | + <goal>file-contents</goal> |
| 505 | + </goals> |
| 506 | + <configuration> |
| 507 | + <baseDir>${generatedDirRelative}/software/xdev/${componentDir}/client/</baseDir> |
| 508 | + <fileMask>ApiClient.java</fileMask> |
| 509 | + <!-- @formatter:off DO NOT INTRODUCE LINE BREAK --> |
| 510 | + <findRegex>^import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;(\r?\n)</findRegex> |
| 511 | + <!-- @formatter:on --> |
| 512 | + <replaceLineBased>false</replaceLineBased> |
| 513 | + </configuration> |
| 514 | + </execution> |
| 515 | + <execution> |
| 516 | + <!-- Changes with each generator version --> |
| 517 | + <id>remove-generated-annotation</id> |
| 518 | + <phase>process-sources</phase> |
| 519 | + <goals> |
| 520 | + <goal>file-contents</goal> |
| 521 | + </goals> |
| 522 | + <configuration> |
| 523 | + <baseDir>${generatedDirRelative}/software/xdev/${componentDir}/</baseDir> |
| 524 | + <recursive>true</recursive> |
| 525 | + <fileMask>.java</fileMask> |
| 526 | + <findRegex>^@jakarta\.annotation\.Generated.*(\r?\n)</findRegex> |
| 527 | + <replaceAll>false</replaceAll> |
| 528 | + <replaceLineBased>false</replaceLineBased> |
| 529 | + </configuration> |
| 530 | + </execution> |
| 531 | + <execution> |
| 532 | + <!-- Requiring Java serialization indicates a serious misuse of the API --> |
| 533 | + <id>remove-serialVersionUID</id> |
| 534 | + <phase>process-sources</phase> |
| 535 | + <goals> |
| 536 | + <goal>file-contents</goal> |
| 537 | + </goals> |
| 538 | + <configuration> |
| 539 | + <baseDir>${generatedDirRelative}/software/xdev/${componentDir}/</baseDir> |
| 540 | + <recursive>true</recursive> |
| 541 | + <fileMask>.java</fileMask> |
| 542 | + <findRegex>^.*serialVersionUID.*(\r?\n)(\s*\r?\n)?</findRegex> |
| 543 | + <replaceAll>false</replaceAll> |
| 544 | + <replaceLineBased>false</replaceLineBased> |
| 545 | + </configuration> |
| 546 | + </execution> |
| 547 | + </executions> |
| 548 | + </plugin> |
| 549 | + </plugins> |
| 550 | + </build> |
| 551 | + </profile> |
| 552 | + <profile> |
| 553 | + <id>pmd</id> |
| 554 | + <build> |
| 555 | + <plugins> |
| 556 | + <plugin> |
274 | 557 | <artifactId>maven-pmd-plugin</artifactId> |
275 | 558 | <version>3.26.0</version> |
276 | 559 | <configuration> |
|
279 | 562 | <rulesets> |
280 | 563 | <ruleset>../.config/pmd/ruleset.xml</ruleset> |
281 | 564 | </rulesets> |
| 565 | + <excludes> |
| 566 | + <exclude>**/generated/**/*.java</exclude> |
| 567 | + </excludes> |
282 | 568 | </configuration> |
283 | 569 | <dependencies> |
284 | 570 | <dependency> |
|
0 commit comments