Skip to content

Commit

Permalink
Remove experimental web app server and supporting jetty dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvanderlinde committed May 25, 2024
1 parent 50db900 commit 323bf49
Show file tree
Hide file tree
Showing 27 changed files with 4 additions and 1,220 deletions.
11 changes: 0 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -372,17 +372,6 @@ dependencies {
implementation group: 'com.jidesoft', name: 'jide-properties', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-shortcut', version: '3.7.9'

// webserver for old webapp that is scheduled for removal
implementation 'org.eclipse.jetty:jetty-server:9.4.51.v20230217'
implementation 'org.eclipse.jetty:jetty-servlet:9.4.42.v20210604'
implementation 'org.eclipse.jetty:jetty-webapp:9.4.44.v20210927'
implementation 'org.eclipse.jetty:jetty-continuation:9.4.42.v20210604'
implementation 'org.eclipse.jetty.websocket:websocket-client:9.4.53.v20231009'
implementation 'org.eclipse.jetty.websocket:websocket-server:9.4.54.v20240208'
implementation 'org.eclipse.jetty.websocket:websocket-servlet:9.4.42.v20210604'
implementation 'org.eclipse.jetty.websocket:websocket-api:9.4.42.v20210604'


// old json lib only used for one macro function. Use gson instead
implementation 'net.sf.json-lib:json-lib:2.4:jdk15'

Expand Down
23 changes: 0 additions & 23 deletions src/main/java/net/rptools/maptool/client/MapTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
import net.rptools.maptool.util.MessageUtil;
import net.rptools.maptool.util.StringUtil;
import net.rptools.maptool.util.UserJvmOptions;
import net.rptools.maptool.webapi.MTWebAppServer;
import net.rptools.parser.ParserException;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
Expand Down Expand Up @@ -168,8 +167,6 @@ public class MapTool {
private static MapToolLineParser parser = new MapToolLineParser();
private static String lastWhisperer;

private static final MTWebAppServer webAppServer = new MTWebAppServer();

// Jamz: To support new command line parameters for multi-monitor support & enhanced PrintStream
private static boolean debug = false;
private static int graphicsMonitor = -1;
Expand Down Expand Up @@ -1346,26 +1343,6 @@ public static boolean useToolTipsForUnformatedRolls() {
}
}

public static MTWebAppServer getWebAppServer() {
return webAppServer;
}

public static void startWebAppServer(final int port) {
try {
Thread webAppThread =
new Thread(
() -> {
webAppServer.setPort(port);
webAppServer.startServer();
});

webAppThread.start();
} catch (Exception e) { // TODO: This needs to be logged
System.out.println("Unable to start web server");
e.printStackTrace();
}
}

public static String getClientId() {
return clientId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public record MacroDetails(
registerMacro(new ChangeColorMacro());
registerMacro(new WhisperReplyMacro());
registerMacro(new EmotePluralMacro());
registerMacro(new ExperimentsMacro());
registerMacro(new TextureNoise());
registerMacro(new VersionMacro());
registerMacro(new AboutMacro());
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import net.rptools.maptool.model.MacroButtonProperties;
import net.rptools.maptool.model.Token;
import net.rptools.maptool.util.PersistenceUtil;
import org.eclipse.jetty.util.StringUtil;
import org.apache.commons.lang.StringUtils;

@SuppressWarnings("serial")
public class ButtonGroupPopupMenu extends JPopupMenu {
Expand Down Expand Up @@ -278,7 +278,7 @@ public void actionPerformed(ActionEvent event) {
}
if (alreadyExists) {
String tokenName = token.getName();
if (MapTool.getPlayer().isGM() && !StringUtil.isEmpty(token.getGMName())) {
if (MapTool.getPlayer().isGM() && !StringUtils.isEmpty(token.getGMName())) {
tokenName = tokenName + "(" + token.getGMName() + ")";
}
alreadyExists =
Expand All @@ -301,7 +301,7 @@ public void actionPerformed(ActionEvent event) {
}
if (alreadyExists) {
String tokenName = token.getName();
if (MapTool.getPlayer().isGM() && !StringUtil.isEmpty(token.getGMName())) {
if (MapTool.getPlayer().isGM() && !StringUtils.isEmpty(token.getGMName())) {
tokenName += "(" + token.getGMName() + ")";
}
alreadyExists =
Expand Down Expand Up @@ -358,7 +358,7 @@ public void addMacrosToToken(List<MacroButtonProperties> newButtonProps, Token t
List<MacroButtonProperties> toAdd = new ArrayList<>(newButtonProps.size());
int nextIndex = token.getMacroNextIndex();
String tokenName = token.getName();
if (MapTool.getPlayer().isGM() && !StringUtil.isEmpty(token.getGMName())) {
if (MapTool.getPlayer().isGM() && !StringUtils.isEmpty(token.getGMName())) {
tokenName = tokenName + "(" + token.getGMName() + ")";
}
for (MacroButtonProperties nextProps : newButtonProps) {
Expand Down
179 changes: 0 additions & 179 deletions src/main/java/net/rptools/maptool/webapi/MTWebAppServer.java

This file was deleted.

Loading

0 comments on commit 323bf49

Please sign in to comment.