|
395 | 395 | </executions> |
396 | 396 | </plugin> |
397 | 397 | <plugin> |
398 | | - <groupId>io.github.floverfelt</groupId> |
| 398 | + <groupId>software.xdev</groupId> |
399 | 399 | <artifactId>find-and-replace-maven-plugin</artifactId> |
400 | | - <version>1.1.0</version> |
| 400 | + <version>1.0.0</version> |
401 | 401 | <executions> |
402 | 402 | <execution> |
| 403 | + <!-- Remove so that we don't need additional dependency --> |
403 | 404 | <id>remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</id> |
404 | 405 | <phase>process-sources</phase> |
405 | 406 | <goals> |
406 | | - <goal>find-and-replace</goal> |
| 407 | + <goal>file-contents</goal> |
407 | 408 | </goals> |
408 | 409 | <configuration> |
409 | 410 | <replacementType>file-contents</replacementType> |
410 | 411 | <baseDir>${generatedDirRelative}/software/xdev/${componentName}/client/</baseDir> |
411 | 412 | <fileMask>ApiClient.java</fileMask> |
412 | 413 | <!-- @formatter:off DO NOT INTRODUCE LINE BREAK --> |
413 | | - <findRegex>^(import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;)$</findRegex> |
414 | | - <!-- Can't be removed as the plugin isn't supporting empty values --> |
415 | | - <replaceValue>// $1</replaceValue> |
| 414 | + <findRegex>^import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;(\r?\n)</findRegex> |
416 | 415 | <!-- @formatter:on --> |
| 416 | + <replaceLineBased>false</replaceLineBased> |
| 417 | + </configuration> |
| 418 | + </execution> |
| 419 | + <execution> |
| 420 | + <!-- Changes with each generator version --> |
| 421 | + <id>remove-generated-annotation</id> |
| 422 | + <phase>process-sources</phase> |
| 423 | + <goals> |
| 424 | + <goal>file-contents</goal> |
| 425 | + </goals> |
| 426 | + <configuration> |
| 427 | + <replacementType>file-contents</replacementType> |
| 428 | + <baseDir>${generatedDirRelative}/software/xdev/${componentName}/</baseDir> |
| 429 | + <recursive>true</recursive> |
| 430 | + <fileMask>.java</fileMask> |
| 431 | + <findRegex>^@jakarta\.annotation\.Generated.*(\r?\n)</findRegex> |
| 432 | + <replaceAll>false</replaceAll> |
| 433 | + <replaceLineBased>false</replaceLineBased> |
| 434 | + </configuration> |
| 435 | + </execution> |
| 436 | + <execution> |
| 437 | + <!-- Requiring Java serialization indicates a serious misuse of the API --> |
| 438 | + <id>remove-serialVersionUID</id> |
| 439 | + <phase>process-sources</phase> |
| 440 | + <goals> |
| 441 | + <goal>file-contents</goal> |
| 442 | + </goals> |
| 443 | + <configuration> |
| 444 | + <replacementType>file-contents</replacementType> |
| 445 | + <baseDir>${generatedDirRelative}/software/xdev/${componentName}/</baseDir> |
| 446 | + <recursive>true</recursive> |
| 447 | + <fileMask>.java</fileMask> |
| 448 | + <findRegex>^.*serialVersionUID.*(\r?\n)(\s*\r?\n)?</findRegex> |
| 449 | + <replaceAll>false</replaceAll> |
| 450 | + <replaceLineBased>false</replaceLineBased> |
417 | 451 | </configuration> |
418 | 452 | </execution> |
419 | 453 | </executions> |
|
0 commit comments