Skip to content

Commit b79a1a4

Browse files
committed
Modularize
1 parent aad6654 commit b79a1a4

2 files changed

Lines changed: 56 additions & 11 deletions

File tree

pom.xml

Lines changed: 37 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,33 @@
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+
<source>1.7</source>
112+
<target>1.7</target>
113+
</configuration>
114+
</execution>
115+
116+
<execution>
117+
<id>module-compile</id>
118+
<phase>compile</phase>
119+
<goals>
120+
<goal>compile</goal>
121+
</goals>
122+
<configuration>
123+
<release>9</release>
124+
<compileSourceRoots>
125+
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
126+
</compileSourceRoots>
127+
<multiReleaseOutput>true</multiReleaseOutput>
128+
</configuration>
129+
</execution>
130+
</executions>
106131
</plugin>
107132
<plugin>
108133
<groupId>org.apache.maven.plugins</groupId>
@@ -183,6 +208,7 @@
183208
<version>${maven.checkstyle.plugin.version}</version>
184209
<configuration>
185210
<configLocation>google_checks.xml</configLocation>
211+
<excludes>**/module-info.java</excludes>
186212
<violationSeverity>warning</violationSeverity>
187213
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
188214
<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)