Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

v3 updates java version 11 #192

Merged
merged 6 commits into from
Jul 24, 2023
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ commands: # a reusable command with parameters
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# This is based on your 1.0 configuration file or project settings
- run:
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
command: java -version
- run:
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11]
java: [11, 17]
os: [ubuntu-latest]
include:
- java: 8
- java: 11
os: windows-latest
- java: 17
os: ubuntu-latest
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Upload Maven build artifact
uses: actions/upload-artifact@v3
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with:
name: artifact
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
Expand All @@ -61,7 +61,7 @@ jobs:
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

- name: Test Maven plugin integration
if: matrix.java == '8'
if: matrix.java == '11'
shell: bash
run: |
cd modules/openapi-generator-maven-plugin
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Cache maven dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -52,10 +52,10 @@ jobs:
- build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Cache maven dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -87,10 +87,10 @@ jobs:
- build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -125,10 +125,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v3
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ test-output/
nbactions.xml
test-output/

# jgit is making a local file in ? dir, needs a version upgrade
?

# scalatra
samples/server-generator/scalatra/output
samples/server-generator/scalatra/target
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20

To build from source, you need the following installed and available in your `$PATH:`

* [Java 8](https://www.oracle.com/technetwork/java/index.html)
* [Java 11](https://www.oracle.com/technetwork/java/index.html)

* [Apache Maven 3.3.4 or greater](https://maven.apache.org/)
* [Apache Maven 3.9.3 or greater](https://maven.apache.org/)

After cloning the project, you can build it from source with this command:
```sh
Expand Down
37 changes: 28 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@
<directory>target</directory>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<encoding>UTF-8</encoding>
<maxmemory>1g</maxmemory>
<failOnWarnings>false</failOnWarnings>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
Expand All @@ -76,8 +97,8 @@
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>${git-commit-id-plugin.version}</version>
<executions>
<execution>
Expand Down Expand Up @@ -166,10 +187,7 @@
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>
${java.io.tmpdir}/dependency-reduced-pom.xml
</dependencyReducedPomLocation>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
Expand Down Expand Up @@ -421,8 +439,9 @@
<revision>3.0.0</revision>
<!-- /RELEASE_VERSION -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<archunit.version>0.23.1</archunit.version>
<checkstyle.plugin.version>3.1.0</checkstyle.plugin.version>
<commons-cli.version>1.4</commons-cli.version>
Expand All @@ -431,7 +450,7 @@
<commons-text.version>1.9</commons-text.version>
<diffutils.version>1.3.0</diffutils.version>
<generex.version>1.0.2</generex.version>
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version><!--5.0.1 needs java11, will fix jgit issue-->
<git-commit-id-plugin.version>5.0.1</git-commit-id-plugin.version>
<groovy.version>3.0.9</groovy.version>
<guava.version>30.1.1-jre</guava.version>
<handlebars-java.version>4.3.0</handlebars-java.version>
Expand Down