Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checkBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
git pull

- name: Set up JDK Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
java-version: '17'
distribution: 'temurin'
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
git pull

- name: Setup - Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK OSSRH
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
Expand Down
47 changes: 34 additions & 13 deletions openapi-client-maven-template/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<generatedDirRelative>src/generated/java</generatedDirRelative>

<!-- Ignore generated code -->
<sonar.exclusions>
src/generated/**
Expand Down Expand Up @@ -106,7 +108,7 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2.1</version>
<version>5.2.3</version>
</dependency>

<!-- JSON processing: jackson -->
Expand All @@ -122,10 +124,6 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
Expand Down Expand Up @@ -188,7 +186,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.2</version>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -221,7 +219,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
Expand All @@ -230,7 +228,7 @@
</goals>
<configuration>
<sources>
<source>src/generated/java</source>
<source>${generatedDirRelative}</source>
</sources>
</configuration>
</execution>
Expand Down Expand Up @@ -285,9 +283,8 @@
<profile>
<id>openapi-generator</id>
<properties>
<basePackage>software.xdev.INSERT_NAME_HERE</basePackage>
<componentName>INSERT_NAME_HERE</componentName>

<generatedDirRelative>src/generated/java</generatedDirRelative>
<generatedDir>${project.basedir}/${generatedDirRelative}</generatedDir>
<openApiRelativeGeneratorDir>src/gen</openApiRelativeGeneratorDir>
<openApiGeneratorDir>
Expand Down Expand Up @@ -340,9 +337,9 @@
<configOptions>
<sourceFolder>${openApiRelativeGeneratorDir}</sourceFolder>
<library>apache-httpclient</library>
<apiPackage>${basePackage}.api</apiPackage>
<modelPackage>${basePackage}.model</modelPackage>
<invokerPackage>${basePackage}.client</invokerPackage>
<apiPackage>software.xdev.${componentName}.api</apiPackage>
<modelPackage>software.xdev.${componentName}.model</modelPackage>
<invokerPackage>software.xdev.${componentName}.client</invokerPackage>
<!-- Otherwise throw and catch everywhere -->
<useRuntimeException>true</useRuntimeException>
<!-- Some fields of API have been ignored because they are unused -->
Expand Down Expand Up @@ -383,6 +380,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.floverfelt</groupId>
<artifactId>find-and-replace-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</id>
<phase>process-sources</phase>
<goals>
<goal>find-and-replace</goal>
</goals>
<configuration>
<replacementType>file-contents</replacementType>
<baseDir>${generatedDirRelative}/software/xdev/${componentName}/client/</baseDir>
<fileMask>ApiClient.java</fileMask>
<!-- @formatter:off DO NOT INTRODUCE LINE BREAK -->
<findRegex>^(import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;)$</findRegex>
<!-- Can't be removed as the plugin isn't supporting empty values -->
<replaceValue>// $1</replaceValue>
<!-- @formatter:on -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down