Fix dependencies resolution
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dmitry Isaenko 2023-02-06 16:16:03 +03:00
parent 83695511d3
commit c34531a92f
4 changed files with 12 additions and 22 deletions

12
pom.xml
View file

@ -40,6 +40,14 @@
</developer> </developer>
</developers> </developers>
<repositories>
<repository>
<id>redrise</id>
<name>redrise.ru repository</name>
<url>http://repo.redrise.ru/releases</url>
</repository>
</repositories>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format> <maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format>
@ -199,11 +207,11 @@
<version>5.9.0</version> <version>5.9.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- picked from local repo --> <!-- redrise repository -->
<dependency> <dependency>
<groupId>ru.redrise</groupId> <groupId>ru.redrise</groupId>
<artifactId>libKonogonka</artifactId> <artifactId>libKonogonka</artifactId>
<version>0.1-SNAPSHOT</version> <version>0.1</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View file

@ -88,8 +88,6 @@ public class AppPreferences {
public String getHostIp(){ return preferences.get("HOSTIP", "0.0.0.0").replaceAll("(\\s)|(\t)", "");} // who the hell said 'paranoid'? public String getHostIp(){ return preferences.get("HOSTIP", "0.0.0.0").replaceAll("(\\s)|(\t)", "");} // who the hell said 'paranoid'?
public void setHostIp(String ip){preferences.put("HOSTIP", ip);} public void setHostIp(String ip){preferences.put("HOSTIP", ip);}
public void give(){preferences.putBoolean("man", true);}
public boolean take(){return preferences.getBoolean("man", false);}
public String getHostPort(){ public String getHostPort(){
String value = preferences.get("HOSTPORT", "6042"); String value = preferences.get("HOSTPORT", "6042");
if (!value.matches("^[0-9]{1,5}$")) if (!value.matches("^[0-9]{1,5}$"))

View file

@ -73,7 +73,7 @@ public class NSLMainController implements Initializable {
if (AppPreferences.getInstance().getAutoCheckUpdates()){ if (AppPreferences.getInstance().getAutoCheckUpdates()){
checkForUpdates(); checkForUpdates();
} }
if (! AppPreferences.getInstance().take()) mainTabPane.getTabs().remove(3);
openLastOpenedTab(); openLastOpenedTab();
} }
private void checkForUpdates(){ private void checkForUpdates(){

View file

@ -18,12 +18,9 @@
*/ */
package nsusbloader.cli; package nsusbloader.cli;
import nsusbloader.AppPreferences;
import nsusbloader.Main;
import nsusbloader.NSLMain; import nsusbloader.NSLMain;
import org.apache.commons.cli.*; import org.apache.commons.cli.*;
import java.time.LocalTime;
import java.util.prefs.Preferences; import java.util.prefs.Preferences;
public class CommandLineInterface { public class CommandLineInterface {
@ -35,12 +32,9 @@ public class CommandLineInterface {
} }
final Options cliOptions = createCliOptions(); final Options cliOptions = createCliOptions();
final Options cliOptionsToBeExact =
createCliOptions().addOption(Option.builder().longOpt("gimmegimmegimme").hasArg(false).build());
CommandLineParser cliParser = new DefaultParser(); CommandLineParser cliParser = new DefaultParser();
try{ try{
CommandLine cli = cliParser.parse(cliOptionsToBeExact, args); CommandLine cli = cliParser.parse(cliOptions, args);
if (cli.hasOption('v') || cli.hasOption("version")){ if (cli.hasOption('v') || cli.hasOption("version")){
handleVersion(); handleVersion();
return; return;
@ -80,16 +74,6 @@ public class CommandLineInterface {
return; return;
} }
*/ */
if (cli.hasOption("gimmegimmegimme")){
if (LocalTime.now().isBefore(LocalTime.parse("09:00:00"))){
AppPreferences.getInstance().give();
AppPreferences.getInstance().setLastOpenedTab("PatchesTabHolder");
System.out.println("=)");
Main.main(new String[]{});
return;
}
throw new ParseException("Unhandled LocalTime() exception;");
}
if (cli.hasOption("s") || cli.hasOption("split")){ if (cli.hasOption("s") || cli.hasOption("split")){
final String[] arguments = cli.getOptionValues("split"); final String[] arguments = cli.getOptionValues("split");
new SplitCli(arguments); new SplitCli(arguments);