Skip to content

Commit

Permalink
8.2.10
Browse files Browse the repository at this point in the history
- fix self-updater losing terminal input when restarting by downgrading internal jansi library which was the cause
  • Loading branch information
Osiris-Team committed Jul 31, 2024
1 parent 9e8f7a5 commit 5fc56de
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ AUTO-GENERATED FILE, CHANGES SHOULD BE DONE IN ./JPM.java or ./src/main/java/JPM
<modelVersion>4.0.0</modelVersion>
<groupId>com.osiris.autoplug.client</groupId>
<artifactId>AutoPlug-Client</artifactId>
<version>8.2.7</version>
<version>8.2.10</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version>
<version>8.2.7</version>
<version>8.2.10</version>
<main-class>com.osiris.autoplug.client.Main</main-class>
<slf4j.version>2.0.13</slf4j.version>
<name>AutoPlug-Client</name>
Expand Down Expand Up @@ -63,7 +63,7 @@ AUTO-GENERATED FILE, CHANGES SHOULD BE DONE IN ./JPM.java or ./src/main/java/JPM
<dependency>
<groupId>com.github.Osiris-Team</groupId>
<artifactId>jansi</artifactId>
<version>2.4.6</version>
<version>2.4.2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -126,7 +126,7 @@ AUTO-GENERATED FILE, CHANGES SHOULD BE DONE IN ./JPM.java or ./src/main/java/JPM
<dependency>
<groupId>com.github.Osiris-Team</groupId>
<artifactId>jansi</artifactId>
<version>2.4.6</version>
<version>2.4.2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/JPM.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ThisProject(List<String> args) {
// Override default configurations
this.groupId = "com.osiris.autoplug.client";
this.artifactId = "AutoPlug-Client";
this.version = "8.2.7";
this.version = "8.2.10";
this.mainClass = "com.osiris.autoplug.client.Main";
this.jarName = "AutoPlug-Client-original.jar";
this.fatJarName = "AutoPlug-Client.jar";
Expand All @@ -38,7 +38,7 @@ public ThisProject(List<String> args) {
forceImplementation("net.java.dev.jna:jna:5.14.0");
forceImplementation("net.java.dev.jna:jna-platform:5.14.0");
forceImplementation("commons-io:commons-io:2.16.1");
forceImplementation("com.github.Osiris-Team:jansi:2.4.6");
forceImplementation("com.github.Osiris-Team:jansi:2.4.2");
forceImplementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.23");
forceImplementation("org.jetbrains.kotlin:kotlin-stdlib-common:1.9.23");
forceImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21");
Expand All @@ -51,7 +51,7 @@ public ThisProject(List<String> args) {
implementation("net.java.dev.jna:jna:5.14.0");
implementation("net.java.dev.jna:jna-platform:5.14.0");
implementation("commons-io:commons-io:2.16.1");
implementation("com.github.Osiris-Team:jansi:2.4.6");
implementation("com.github.Osiris-Team:jansi:2.4.2");
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.23");
implementation("org.jetbrains.kotlin:kotlin-stdlib-common:1.9.23");
implementation("org.slf4j:slf4j-api:2.0.13");
Expand Down Expand Up @@ -88,8 +88,9 @@ public static void main(String[] _args) throws Exception {
project.generatePom();

List<String> mavenArgs = new ArrayList<>();
mavenArgs.add("clean");
mavenArgs.add("package");
mavenArgs.add("clean");mavenArgs.add("package");
//mavenArgs.addAll(Arrays.asList("dependency:purge-local-repository -Dinclude:jansi -DresolutionFuzziness=artifactId -Dverbose".split(" ")));
//mavenArgs.add("install");
if(!args.contains("test")) mavenArgs.add("-DskipTests");
JPM.executeMaven(mavenArgs.toArray(new String[0]));

Expand Down
26 changes: 17 additions & 9 deletions src/main/java/com/osiris/autoplug/client/SystemChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,21 @@ public void addShutDownHook() {
try {
if (Server.isRunning()) Server.stop();
} catch (Exception e) {
AL.warn("Error during shutdown, related to stopping the server!", e);
System.err.println("Error during shutdown, related to stopping the server!");
e.printStackTrace();
System.err.println("Error during shutdown, related to stopping the server!");
}

try {
if (AL.isStarted)
SSHManager.stop();
} catch (Exception e) {
System.out.println("Error during shutdown, related to stopping the SSH server!");
e.printStackTrace();
System.out.println("Error during shutdown, related to stopping the SSH server!");
}

// Stop Logger last
try {
if (AL.isStarted) {
AL.info("See you soon!");
Expand All @@ -79,15 +92,10 @@ public void addShutDownHook() {
System.out.println("See you soon!");
}
} catch (Exception e) {
AL.warn("Error during shutdown, related to the AutoPlug-Logger!", e);
System.err.println("Error during shutdown, related to the AutoPlug-Logger!");
e.printStackTrace();
System.err.println("Error during shutdown, related to the AutoPlug-Logger!");
}
try {
SSHManager.stop();
} catch (Exception e) {
AL.warn("Error during shutdown, related to stopping the server!", e);
}


}, "Shutdown-Thread"));
}
}

0 comments on commit 5fc56de

Please sign in to comment.