Skip to content

Commit 30ba037

Browse files
committed
Merge branch 'issue-1308' into master
2 parents 70092c6 + 239ded8 commit 30ba037

File tree

5 files changed

+76
-28
lines changed

5 files changed

+76
-28
lines changed

.github/workflows/checkstyle.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow will build a Java project with Maven
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
33

44
name: Java Code Style Check with Maven
55

@@ -11,10 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up JDK 1.8
16-
uses: actions/setup-java@v1
14+
- uses: actions/checkout@v3
15+
- name: Set up JDK 17
16+
uses: actions/setup-java@v3
1717
with:
18-
java-version: 1.8
18+
java-version: '17'
19+
distribution: 'temurin'
1920
- name: Code Style Check
2021
run: mvn -B checkstyle:check --file pom.xml

.github/workflows/ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ jobs:
66
Build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
10-
- name: Set up JDK 1.8
11-
uses: actions/setup-java@v1
9+
- uses: actions/checkout@v3
10+
- name: Set up JDK 17
11+
uses: actions/setup-java@v3
1212
with:
13-
java-version: 1.8
13+
java-version: '17'
14+
distribution: 'temurin'
1415
- name: Build
1516
run: mvn -DskipTests package --file pom.xml
1617

1718
Test:
1819
runs-on: ubuntu-latest
1920
steps:
20-
- uses: actions/checkout@v1
21-
- name: Set up JDK 1.8
22-
uses: actions/setup-java@v1
21+
- uses: actions/checkout@v3
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v3
2324
with:
24-
java-version: 1.8
25+
java-version: '17'
26+
distribution: 'temurin'
2527
- name: Test
2628
run: mvn test --file pom.xml

.github/workflows/sonar.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ jobs:
88
name: SonarQube
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
14-
- name: Set up JDK 11
15-
uses: actions/setup-java@v1
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v3
1616
with:
17-
java-version: 11
17+
java-version: '17'
18+
distribution: 'temurin'
1819
- name: Cache SonarCloud packages
1920
uses: actions/cache@v1
2021
with:

pom.xml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
<url>https://github.com/TooTallNate/Java-WebSocket</url>
1212
<properties>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
<slf4j.version>1.7.25</slf4j.version>
14+
<slf4j.version>2.0.6</slf4j.version>
1515

1616
<!-- Test dependencies versions -->
1717
<junit.version>4.12</junit.version>
1818
<org.json.version>20180813</org.json.version>
1919

2020
<!-- Maven plugin versions -->
21-
<bnd.maven.plugin.version>4.3.1</bnd.maven.plugin.version>
21+
<bnd.maven.plugin.version>6.4.0</bnd.maven.plugin.version>
2222
<maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version>
23-
<maven.compiler.plugin.version>3.7.0</maven.compiler.plugin.version>
23+
<maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
2424
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
25-
<maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
26-
<maven.javadoc.plugin.version>2.10.3</maven.javadoc.plugin.version>
27-
<maven.shade.plugin.version>3.1.0</maven.shade.plugin.version>
28-
<maven.source.plugin.version>3.0.0</maven.source.plugin.version>
25+
<maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
26+
<maven.javadoc.plugin.version>3.5.0</maven.javadoc.plugin.version>
27+
<maven.shade.plugin.version>3.4.1</maven.shade.plugin.version>
28+
<maven.source.plugin.version>3.2.1</maven.source.plugin.version>
2929
<nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version>
3030
<sonar.projectKey>org.java-websocket:Java-WebSocket</sonar.projectKey>
3131
<sonar.organization>marci4-github</sonar.organization>
@@ -86,10 +86,12 @@
8686
</goals>
8787
<configuration>
8888
<bnd><![CDATA[
89+
Multi-Release: true
8990
Export-Package: \
9091
org.java_websocket.*
9192
-noextraheaders: true
9293
-snapshot: SNAPSHOT
94+
-fixupmessages "Classes found in the wrong directory"; restrict:=error; is:=warning
9395
]]></bnd>
9496
</configuration>
9597
</execution>
@@ -99,10 +101,32 @@
99101
<groupId>org.apache.maven.plugins</groupId>
100102
<artifactId>maven-compiler-plugin</artifactId>
101103
<version>${maven.compiler.plugin.version}</version>
102-
<configuration>
103-
<source>1.7</source>
104-
<target>1.7</target>
105-
</configuration>
104+
<executions>
105+
<execution>
106+
<id>default-compile</id>
107+
<goals>
108+
<goal>compile</goal>
109+
</goals>
110+
<configuration>
111+
<release>7</release>
112+
</configuration>
113+
</execution>
114+
115+
<execution>
116+
<id>module-compile</id>
117+
<phase>compile</phase>
118+
<goals>
119+
<goal>compile</goal>
120+
</goals>
121+
<configuration>
122+
<release>9</release>
123+
<compileSourceRoots>
124+
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
125+
</compileSourceRoots>
126+
<multiReleaseOutput>true</multiReleaseOutput>
127+
</configuration>
128+
</execution>
129+
</executions>
106130
</plugin>
107131
<plugin>
108132
<groupId>org.apache.maven.plugins</groupId>
@@ -183,6 +207,7 @@
183207
<version>${maven.checkstyle.plugin.version}</version>
184208
<configuration>
185209
<configLocation>google_checks.xml</configLocation>
210+
<excludes>**/module-info.java</excludes>
186211
<violationSeverity>warning</violationSeverity>
187212
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
188213
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>

src/main/java9/module-info.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* This module implements a barebones WebSocket server and client.
3+
*/
4+
module org.java_websocket {
5+
requires transitive org.slf4j;
6+
7+
exports org.java_websocket;
8+
exports org.java_websocket.client;
9+
exports org.java_websocket.drafts;
10+
exports org.java_websocket.enums;
11+
exports org.java_websocket.exceptions;
12+
exports org.java_websocket.extensions;
13+
exports org.java_websocket.extensions.permessage_deflate;
14+
exports org.java_websocket.framing;
15+
exports org.java_websocket.handshake;
16+
exports org.java_websocket.interfaces;
17+
exports org.java_websocket.protocols;
18+
exports org.java_websocket.server;
19+
}

0 commit comments

Comments
 (0)