|
122 | 122 | <groupId>com.fasterxml.jackson.core</groupId> |
123 | 123 | <artifactId>jackson-databind</artifactId> |
124 | 124 | </dependency> |
125 | | - <dependency> |
126 | | - <groupId>com.fasterxml.jackson.jaxrs</groupId> |
127 | | - <artifactId>jackson-jaxrs-json-provider</artifactId> |
128 | | - </dependency> |
129 | 125 | <dependency> |
130 | 126 | <groupId>com.fasterxml.jackson.datatype</groupId> |
131 | 127 | <artifactId>jackson-datatype-jsr310</artifactId> |
|
285 | 281 | <profile> |
286 | 282 | <id>openapi-generator</id> |
287 | 283 | <properties> |
288 | | - <basePackage>software.xdev.INSERT_NAME_HERE</basePackage> |
| 284 | + <componentName>INSERT_NAME_HERE</componentName> |
289 | 285 |
|
290 | 286 | <generatedDirRelative>src/generated/java</generatedDirRelative> |
291 | 287 | <generatedDir>${project.basedir}/${generatedDirRelative}</generatedDir> |
|
340 | 336 | <configOptions> |
341 | 337 | <sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder> |
342 | 338 | <library>apache-httpclient</library> |
343 | | - <apiPackage>${basePackage}.api</apiPackage> |
344 | | - <modelPackage>${basePackage}.model</modelPackage> |
345 | | - <invokerPackage>${basePackage}.client</invokerPackage> |
| 339 | + <apiPackage>software.xdev.${componentName}.api</apiPackage> |
| 340 | + <modelPackage>software.xdev.${componentName}.model</modelPackage> |
| 341 | + <invokerPackage>software.xdev.${componentName}.client</invokerPackage> |
346 | 342 | <!-- Otherwise throw and catch everywhere --> |
347 | 343 | <useRuntimeException>true</useRuntimeException> |
348 | 344 | <!-- Some fields of API have been ignored because they are unused --> |
|
383 | 379 | </execution> |
384 | 380 | </executions> |
385 | 381 | </plugin> |
| 382 | + <plugin> |
| 383 | + <groupId>io.github.floverfelt</groupId> |
| 384 | + <artifactId>find-and-replace-maven-plugin</artifactId> |
| 385 | + <version>1.1.0</version> |
| 386 | + <executions> |
| 387 | + <execution> |
| 388 | + <id>remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</id> |
| 389 | + <phase>process-sources</phase> |
| 390 | + <goals> |
| 391 | + <goal>find-and-replace</goal> |
| 392 | + </goals> |
| 393 | + <configuration> |
| 394 | + <replacementType>file-contents</replacementType> |
| 395 | + <baseDir>${generatedDirRelative}/software/xdev/${componentName}/client/</baseDir> |
| 396 | + <fileMask>ApiClient.java</fileMask> |
| 397 | + <!-- @formatter:off DO NOT INTRODUCE LINE BREAK --> |
| 398 | + <findRegex>^(import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;)$</findRegex> |
| 399 | + <!-- Can't be removed as the plugin isn't supporting empty values --> |
| 400 | + <replaceValue>// $1</replaceValue> |
| 401 | + <!-- @formatter:on --> |
| 402 | + </configuration> |
| 403 | + </execution> |
| 404 | + </executions> |
| 405 | + </plugin> |
386 | 406 | </plugins> |
387 | 407 | </build> |
388 | 408 | </profile> |
|
0 commit comments