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

Commit fef4bae

Browse files
authored
v3 updates java version 11 (#192)
* Requires java 11 * Fixes git commit id version which rev rolls jgit * Removes java setting * Switches to latest 2004 ubuntu image in circleci * Updates github actions, adds maven-javadoc-plugin * Reverts ubuntu image back
1 parent 6e84144 commit fef4bae

File tree

6 files changed

+43
-27
lines changed

6 files changed

+43
-27
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ commands: # a reusable command with parameters
3232
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
3333
# This is based on your 1.0 configuration file or project settings
3434
- run:
35-
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
35+
command: java -version
3636
- run:
3737
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
3838
- run:

.github/workflows/check-supported-versions.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
java: [8, 11]
13+
java: [11, 17]
1414
os: [ubuntu-latest]
1515
include:
16-
- java: 8
16+
- java: 11
1717
os: windows-latest
1818
- java: 17
1919
os: ubuntu-latest
@@ -51,7 +51,7 @@ jobs:
5151

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

6363
- name: Test Maven plugin integration
64-
if: matrix.java == '8'
64+
if: matrix.java == '11'
6565
shell: bash
6666
run: |
6767
cd modules/openapi-generator-maven-plugin

.github/workflows/openapi-generator.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v3
19-
- name: Set up JDK 8
19+
- name: Set up JDK 11
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: 8
22+
java-version: 11
2323
distribution: 'temurin'
2424
- name: Cache maven dependencies
2525
uses: actions/cache@v3
@@ -52,10 +52,10 @@ jobs:
5252
- build
5353
steps:
5454
- uses: actions/checkout@v3
55-
- name: Set up JDK 8
55+
- name: Set up JDK 11
5656
uses: actions/setup-java@v3
5757
with:
58-
java-version: 8
58+
java-version: 11
5959
distribution: 'temurin'
6060
- name: Cache maven dependencies
6161
uses: actions/cache@v3
@@ -87,10 +87,10 @@ jobs:
8787
- build
8888
steps:
8989
- uses: actions/checkout@v3
90-
- name: Set up JDK 8
90+
- name: Set up JDK 11
9191
uses: actions/setup-java@v3
9292
with:
93-
java-version: 8
93+
java-version: 11
9494
distribution: 'temurin'
9595
- name: Download openapi-generator-cli.jar artifact
9696
uses: actions/download-artifact@v3
@@ -125,10 +125,10 @@ jobs:
125125
runs-on: ubuntu-latest
126126
steps:
127127
- uses: actions/checkout@v3
128-
- name: Set up JDK 8
128+
- name: Set up JDK 11
129129
uses: actions/setup-java@v3
130130
with:
131-
java-version: 8
131+
java-version: 11
132132
distribution: 'temurin'
133133
- name: Download openapi-generator-cli.jar artifact
134134
uses: actions/download-artifact@v3

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ test-output/
4646
nbactions.xml
4747
test-output/
4848

49-
# jgit is making a local file in ? dir, needs a version upgrade
50-
?
51-
5249
# scalatra
5350
samples/server-generator/scalatra/output
5451
samples/server-generator/scalatra/target

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
104104

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

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

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

111111
After cloning the project, you can build it from source with this command:
112112
```sh

pom.xml

+28-9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,27 @@
5555
<directory>target</directory>
5656
<finalName>${project.artifactId}</finalName>
5757
<plugins>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-javadoc-plugin</artifactId>
61+
<version>${maven-javadoc-plugin.version}</version>
62+
<configuration>
63+
<source>${maven.compiler.source}</source>
64+
<encoding>UTF-8</encoding>
65+
<maxmemory>1g</maxmemory>
66+
<failOnWarnings>false</failOnWarnings>
67+
<doclint>none</doclint>
68+
</configuration>
69+
<executions>
70+
<execution>
71+
<id>attach-javadocs</id>
72+
<phase>verify</phase>
73+
<goals>
74+
<goal>jar</goal>
75+
</goals>
76+
</execution>
77+
</executions>
78+
</plugin>
5879
<plugin>
5980
<groupId>com.github.spotbugs</groupId>
6081
<artifactId>spotbugs-maven-plugin</artifactId>
@@ -76,8 +97,8 @@
7697
</executions>
7798
</plugin>
7899
<plugin>
79-
<groupId>pl.project13.maven</groupId>
80-
<artifactId>git-commit-id-plugin</artifactId>
100+
<groupId>io.github.git-commit-id</groupId>
101+
<artifactId>git-commit-id-maven-plugin</artifactId>
81102
<version>${git-commit-id-plugin.version}</version>
82103
<executions>
83104
<execution>
@@ -166,10 +187,7 @@
166187
</goals>
167188
<configuration>
168189
<minimizeJar>false</minimizeJar>
169-
<createDependencyReducedPom>true</createDependencyReducedPom>
170-
<dependencyReducedPomLocation>
171-
${java.io.tmpdir}/dependency-reduced-pom.xml
172-
</dependencyReducedPomLocation>
190+
<createDependencyReducedPom>false</createDependencyReducedPom>
173191
<transformers>
174192
<transformer
175193
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
@@ -421,8 +439,9 @@
421439
<revision>3.0.0</revision>
422440
<!-- /RELEASE_VERSION -->
423441
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
424-
<maven.compiler.source>1.8</maven.compiler.source>
425-
<maven.compiler.target>1.8</maven.compiler.target>
442+
<java.version>11</java.version>
443+
<maven.compiler.source>${java.version}</maven.compiler.source>
444+
<maven.compiler.target>${java.version}</maven.compiler.target>
426445
<archunit.version>0.23.1</archunit.version>
427446
<checkstyle.plugin.version>3.1.0</checkstyle.plugin.version>
428447
<commons-cli.version>1.4</commons-cli.version>
@@ -431,7 +450,7 @@
431450
<commons-text.version>1.9</commons-text.version>
432451
<diffutils.version>1.3.0</diffutils.version>
433452
<generex.version>1.0.2</generex.version>
434-
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version><!--5.0.1 needs java11, will fix jgit issue-->
453+
<git-commit-id-plugin.version>5.0.1</git-commit-id-plugin.version>
435454
<groovy.version>3.0.9</groovy.version>
436455
<guava.version>30.1.1-jre</guava.version>
437456
<handlebars-java.version>4.3.0</handlebars-java.version>

0 commit comments

Comments
 (0)