Skip to content

Commit 2f7dacd

Browse files
jdk17 support
fixes #3899 --------- Signed-off-by: Gino Augustine <[email protected]>
1 parent 27edbb3 commit 2f7dacd

File tree

23 files changed

+98
-100
lines changed

23 files changed

+98
-100
lines changed

.github/workflows/apiary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout master branch
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
- name: Install drafter
2121
run: npm install drafter
2222
- name: Build

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,30 @@ on:
1111

1212
jobs:
1313
build:
14-
name: ${{ matrix.os }} with Java 11
14+
name: ${{ matrix.os }} with Java 17
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
2020
steps:
2121
- name: Checkout master branch
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25-
- name: Set up JDK 11
26-
uses: actions/setup-java@v1
25+
- name: Set up JDK 17
26+
uses: actions/setup-java@v3
2727
with:
28-
java-version: 11
28+
distribution: 'oracle'
29+
java-version: '17'
2930
- name: Cache Maven packages
30-
uses: actions/cache@v2
31+
uses: actions/cache@v3
3132
with:
3233
path: ~/.m2
3334
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3435
restore-keys: ${{ runner.os }}-m2
3536
- name: Checkout Universal ctags
36-
uses: actions/checkout@v2
37+
uses: actions/checkout@v4
3738
with:
3839
repository: universal-ctags/ctags
3940
path: ctags

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ jobs:
2121

2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@v2
25-
24+
uses: actions/checkout@v4
25+
- name: Set up JDK 17
26+
uses: actions/setup-java@v3
27+
with:
28+
distribution: 'oracle'
29+
java-version: '17'
2630
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v1
31+
uses: github/codeql-action/init@v2
2832
with:
2933
languages: ${{ matrix.language }}
3034

3135
- name: Autobuild
32-
uses: github/codeql-action/autobuild@v1
36+
uses: github/codeql-action/autobuild@v2
3337

3438
- name: Perform CodeQL Analysis
35-
uses: github/codeql-action/analyze@v1
39+
uses: github/codeql-action/analyze@v2

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout master branch
10-
uses: actions/checkout@v3
10+
uses: actions/checkout@v4
1111
- uses: actions/setup-python@v4
1212
with:
1313
python-version: '3.10'

.github/workflows/javadoc.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout master branch
20-
uses: actions/checkout@v2
21-
- name: Set up JDK 11
22-
uses: actions/setup-java@v1
20+
uses: actions/checkout@v4
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@v3
2323
with:
24-
java-version: 11
24+
distribution: 'oracle'
25+
java-version: '17'
2526
- name: Cache Maven packages
26-
uses: actions/cache@v2
27+
uses: actions/cache@v3
2728
with:
2829
path: ~/.m2
2930
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3031
restore-keys: ${{ runner.os }}-m2
3132
- name: Checkout gh-pages branch
3233
if: github.repository == 'oracle/opengrok'
33-
uses: actions/checkout@v2
34+
uses: actions/checkout@v4
3435
with:
3536
ref: gh-pages
3637
path: gh-pages

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout master branch
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
- name: Get the tag name
1919
id: get_tag
2020
env:
@@ -25,19 +25,20 @@ jobs:
2525
needs: get_tag
2626
steps:
2727
- name: Checkout master branch
28-
uses: actions/checkout@v2
29-
- name: Set up JDK 11
30-
uses: actions/setup-java@v1
28+
uses: actions/checkout@v4
29+
- name: Set up JDK 17
30+
uses: actions/setup-java@v3
3131
with:
32-
java-version: 11
32+
distribution: 'oracle'
33+
java-version: '17'
3334
- name: Cache Maven packages
34-
uses: actions/cache@v2
35+
uses: actions/cache@v3
3536
with:
3637
path: ~/.m2
3738
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3839
restore-keys: ${{ runner.os }}-m2
3940
- name: Checkout Universal ctags
40-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
4142
with:
4243
repository: universal-ctags/ctags
4344
path: ctags

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
FROM ubuntu:jammy as build
55

66
# hadolint ignore=DL3008
7-
RUN apt-get update && apt-get install --no-install-recommends -y openjdk-11-jdk python3 python3-venv && \
7+
RUN apt-get update && apt-get install --no-install-recommends -y openjdk-17-jdk python3 python3-venv && \
88
apt-get clean && \
99
rm -rf /var/lib/apt/lists/*
1010

@@ -41,7 +41,7 @@ RUN cp `ls -t distribution/target/*.tar.gz | head -1` /opengrok.tar.gz
4141
# Store the version in a file so that the tools can report it.
4242
RUN /mvn/mvnw help:evaluate -Dexpression=project.version -q -DforceStdout > /mvn/VERSION
4343

44-
FROM tomcat:10.1-jdk11
44+
FROM tomcat:10.1.13-jdk17
4545
LABEL maintainer="https://github.com/oracle/opengrok"
4646

4747
# Add Perforce apt source.
@@ -93,6 +93,11 @@ ENV CATALINA_BASE /usr/local/tomcat
9393
ENV CATALINA_TMPDIR /usr/local/tomcat/temp
9494
ENV PATH $CATALINA_HOME/bin:$PATH
9595
ENV CLASSPATH /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
96+
ENV JAVA_OPTS="--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
97+
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
98+
--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED \
99+
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED \
100+
--add-opens=java.base/java.util=ALL-UNNAMED"
96101

97102
# disable all file logging
98103
COPY docker/logging.properties /usr/local/tomcat/conf/logging.properties

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ image based on the official one.
2626
## Additional info about the image
2727

2828
* Tomcat 10
29-
* JRE 11
29+
* JRE 17
3030
* Configurable mirroring/reindexing (default every 10 min)
3131

3232
The mirroring step works by going through all projects and attempting to

opengrok-indexer/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,14 @@ Portions Copyright (c) 2020-2020, Lubos Kosco <[email protected]>.
377377
</excludes>
378378
<argLine>
379379
@{surefireArgLine}
380-
--illegal-access=permit
380+
381381
</argLine>
382382
</configuration>
383383
</plugin>
384+
<plugin>
385+
<groupId>org.apache.maven.plugins</groupId>
386+
<artifactId>maven-compiler-plugin</artifactId>
387+
</plugin>
384388
</plugins>
385389
</build>
386390

opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/RuntimeEnvironment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ public void applyConfig(String configuration, boolean reindex, CommandTimeoutTyp
18491849
* @param reindex is the message result of reindex
18501850
* @param cmdType command timeout type
18511851
* @see ConfigurationChangedListener
1852-
* </p>
1852+
*
18531853
*/
18541854
public void applyConfig(Configuration config, boolean reindex, CommandTimeoutType cmdType) {
18551855
setConfiguration(config, cmdType);

0 commit comments

Comments
 (0)