Skip to content

Commit

Permalink
Modularize
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyvdotbe committed Feb 24, 2023
1 parent aad6654 commit a312558
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 11 deletions.
1 change: 1 addition & 0 deletions bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-fixupmessages "Classes found in the wrong directory"; restrict:=error; is:=warning
46 changes: 35 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
<url>https://github.com/TooTallNate/Java-WebSocket</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.7.25</slf4j.version>
<slf4j.version>2.0.6</slf4j.version>

<!-- Test dependencies versions -->
<junit.version>4.12</junit.version>
<org.json.version>20180813</org.json.version>

<!-- Maven plugin versions -->
<bnd.maven.plugin.version>4.3.1</bnd.maven.plugin.version>
<bnd.maven.plugin.version>6.4.0</bnd.maven.plugin.version>
<maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version>
<maven.compiler.plugin.version>3.7.0</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
<maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
<maven.javadoc.plugin.version>2.10.3</maven.javadoc.plugin.version>
<maven.shade.plugin.version>3.1.0</maven.shade.plugin.version>
<maven.source.plugin.version>3.0.0</maven.source.plugin.version>
<maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
<maven.javadoc.plugin.version>3.5.0</maven.javadoc.plugin.version>
<maven.shade.plugin.version>3.4.1</maven.shade.plugin.version>
<maven.source.plugin.version>3.2.1</maven.source.plugin.version>
<nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version>
<sonar.projectKey>org.java-websocket:Java-WebSocket</sonar.projectKey>
<sonar.organization>marci4-github</sonar.organization>
Expand Down Expand Up @@ -99,10 +99,33 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</execution>

<execution>
<id>module-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>9</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -183,6 +206,7 @@
<version>${maven.checkstyle.plugin.version}</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<excludes>**/module-info.java</excludes>
<violationSeverity>warning</violationSeverity>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
Expand Down
19 changes: 19 additions & 0 deletions src/main/java9/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* This module implements a barebones WebSocket server and client.
*/
module org.java_websocket {
requires transitive org.slf4j;

exports org.java_websocket;
exports org.java_websocket.client;
exports org.java_websocket.drafts;
exports org.java_websocket.enums;
exports org.java_websocket.exceptions;
exports org.java_websocket.extensions;
exports org.java_websocket.extensions.permessage_deflate;
exports org.java_websocket.framing;
exports org.java_websocket.handshake;
exports org.java_websocket.interfaces;
exports org.java_websocket.protocols;
exports org.java_websocket.server;
}

0 comments on commit a312558

Please sign in to comment.