|
48 | 48 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
49 | 49 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
50 | 50 |
|
| 51 | + <generatedDirRelative>src/generated/java</generatedDirRelative> |
| 52 | + |
51 | 53 | <!-- Ignore generated code --> |
52 | 54 | <sonar.exclusions> |
53 | 55 | src/generated/** |
|
106 | 108 | <dependency> |
107 | 109 | <groupId>org.apache.httpcomponents.client5</groupId> |
108 | 110 | <artifactId>httpclient5</artifactId> |
109 | | - <version>5.2.1</version> |
| 111 | + <version>5.2.3</version> |
110 | 112 | </dependency> |
111 | 113 |
|
112 | 114 | <!-- JSON processing: jackson --> |
|
122 | 124 | <groupId>com.fasterxml.jackson.core</groupId> |
123 | 125 | <artifactId>jackson-databind</artifactId> |
124 | 126 | </dependency> |
125 | | - <dependency> |
126 | | - <groupId>com.fasterxml.jackson.jaxrs</groupId> |
127 | | - <artifactId>jackson-jaxrs-json-provider</artifactId> |
128 | | - </dependency> |
129 | 127 | <dependency> |
130 | 128 | <groupId>com.fasterxml.jackson.datatype</groupId> |
131 | 129 | <artifactId>jackson-datatype-jsr310</artifactId> |
|
188 | 186 | <plugin> |
189 | 187 | <groupId>org.apache.maven.plugins</groupId> |
190 | 188 | <artifactId>maven-javadoc-plugin</artifactId> |
191 | | - <version>3.6.2</version> |
| 189 | + <version>3.6.3</version> |
192 | 190 | <executions> |
193 | 191 | <execution> |
194 | 192 | <id>attach-javadocs</id> |
|
221 | 219 | <plugin> |
222 | 220 | <groupId>org.codehaus.mojo</groupId> |
223 | 221 | <artifactId>build-helper-maven-plugin</artifactId> |
224 | | - <version>3.4.0</version> |
| 222 | + <version>3.5.0</version> |
225 | 223 | <executions> |
226 | 224 | <execution> |
227 | 225 | <phase>generate-sources</phase> |
|
230 | 228 | </goals> |
231 | 229 | <configuration> |
232 | 230 | <sources> |
233 | | - <source>src/generated/java</source> |
| 231 | + <source>${generatedDirRelative}</source> |
234 | 232 | </sources> |
235 | 233 | </configuration> |
236 | 234 | </execution> |
|
285 | 283 | <profile> |
286 | 284 | <id>openapi-generator</id> |
287 | 285 | <properties> |
288 | | - <basePackage>software.xdev.sessionize</basePackage> |
| 286 | + <componentName>sessionize</componentName> |
289 | 287 |
|
290 | | - <generatedDir>${project.basedir}/src/generated/java</generatedDir> |
| 288 | + <generatedDir>${project.basedir}/${generatedDirRelative}</generatedDir> |
291 | 289 | <openApiRelativeGeneratorDir>src/gen</openApiRelativeGeneratorDir> |
292 | 290 | <openApiGeneratorDir> |
293 | 291 | ${project.basedir}/target/generated-sources/openapi/${openApiRelativeGeneratorDir} |
|
339 | 337 | <configOptions> |
340 | 338 | <sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder> |
341 | 339 | <library>apache-httpclient</library> |
342 | | - <apiPackage>${basePackage}.api</apiPackage> |
343 | | - <modelPackage>${basePackage}.model</modelPackage> |
344 | | - <invokerPackage>${basePackage}.client</invokerPackage> |
| 340 | + <apiPackage>software.xdev.${componentName}.api</apiPackage> |
| 341 | + <modelPackage>software.xdev.${componentName}.model</modelPackage> |
| 342 | + <invokerPackage>software.xdev.${componentName}.client</invokerPackage> |
345 | 343 | <!-- Otherwise throw and catch everywhere --> |
346 | 344 | <useRuntimeException>true</useRuntimeException> |
347 | 345 | <!-- Some fields of API have been ignored because they are unused --> |
|
382 | 380 | </execution> |
383 | 381 | </executions> |
384 | 382 | </plugin> |
| 383 | + <plugin> |
| 384 | + <groupId>io.github.floverfelt</groupId> |
| 385 | + <artifactId>find-and-replace-maven-plugin</artifactId> |
| 386 | + <version>1.1.0</version> |
| 387 | + <executions> |
| 388 | + <execution> |
| 389 | + <id>remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</id> |
| 390 | + <phase>process-sources</phase> |
| 391 | + <goals> |
| 392 | + <goal>find-and-replace</goal> |
| 393 | + </goals> |
| 394 | + <configuration> |
| 395 | + <replacementType>file-contents</replacementType> |
| 396 | + <baseDir>${generatedDirRelative}/software/xdev/${componentName}/client/</baseDir> |
| 397 | + <fileMask>ApiClient.java</fileMask> |
| 398 | + <!-- @formatter:off DO NOT INTRODUCE LINE BREAK --> |
| 399 | + <findRegex>^(import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;)$</findRegex> |
| 400 | + <!-- Can't be removed as the plugin isn't supporting empty values --> |
| 401 | + <replaceValue>// $1</replaceValue> |
| 402 | + <!-- @formatter:on --> |
| 403 | + </configuration> |
| 404 | + </execution> |
| 405 | + </executions> |
| 406 | + </plugin> |
385 | 407 | </plugins> |
386 | 408 | </build> |
387 | 409 | </profile> |
|
0 commit comments