From 92d2e7ecf3d9da1ba3f28bf4ce7e8a6a79e87de7 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:30:02 +0200 Subject: [PATCH 01/38] Organise imports --- src/com/exolius/simplebackup/DeleteSchedule.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/exolius/simplebackup/DeleteSchedule.java b/src/com/exolius/simplebackup/DeleteSchedule.java index f178daa..9c4d410 100644 --- a/src/com/exolius/simplebackup/DeleteSchedule.java +++ b/src/com/exolius/simplebackup/DeleteSchedule.java @@ -1,9 +1,13 @@ package com.exolius.simplebackup; -import java.io.File; import java.io.IOException; -import java.text.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; From 7cb8fbcb111cc6c220a4fceda2148bce7db13af7 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:30:26 +0200 Subject: [PATCH 02/38] Remove bukkit API (spigot API includes bukkit) --- pom.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pom.xml b/pom.xml index 062c1ef..bc7aaf3 100644 --- a/pom.xml +++ b/pom.xml @@ -39,12 +39,5 @@ 1.11.2-R0.1-SNAPSHOT/ provided - - - org.bukkit - bukkit - 1.11.2-R0.1-SNAPSHOT/ - provided - From d590eeec2a92ee831ea7f7e957820d3881baa40c Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:39:23 +0200 Subject: [PATCH 03/38] Better formatting of pom.xml --- pom.xml | 87 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/pom.xml b/pom.xml index bc7aaf3..f53f444 100644 --- a/pom.xml +++ b/pom.xml @@ -1,43 +1,48 @@ - 4.0.0 - com.exolius.simplebackup - SimpleBackup - 1.8 - - src - - - src - true - - **/*.java - - - - - - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - - - - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - - - - org.spigotmc - spigot-api - 1.11.2-R0.1-SNAPSHOT/ - provided - - + 4.0.0 + com.exolius.simplebackup + SimpleBackup + 1.8 + + src + + + + src + true + + **/*.java + + + + + + + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + + + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + + + + + org.spigotmc + spigot-api + 1.12-R0.1-SNAPSHOT/ + provided + + + From 8d7983bb5b59fed34cd35cc1c7ea56b32079aadc Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:40:33 +0200 Subject: [PATCH 04/38] Remove / (why was this here in the first place?) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f53f444..2687bbf 100644 --- a/pom.xml +++ b/pom.xml @@ -40,9 +40,9 @@ org.spigotmc spigot-api - 1.12-R0.1-SNAPSHOT/ + 1.12-R0.1-SNAPSHOT provided - + From a2ccc89ecfd575343732ceb85a80a618b0cf6bf6 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:44:59 +0200 Subject: [PATCH 05/38] Update to non-deprecated methods --- src/com/exolius/simplebackup/SimpleBackup.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/exolius/simplebackup/SimpleBackup.java b/src/com/exolius/simplebackup/SimpleBackup.java index d6f41d5..a59b5bb 100644 --- a/src/com/exolius/simplebackup/SimpleBackup.java +++ b/src/com/exolius/simplebackup/SimpleBackup.java @@ -239,7 +239,13 @@ private Collection worldsForBackup() { } private double hoursOf(Date parsedTime) { - return parsedTime.getHours() + parsedTime.getMinutes() / 60. + parsedTime.getSeconds() / 3600.; + Calendar calendar = GregorianCalendar.getInstance(); + calendar.setTime(parsedTime); + int hours = calendar.get(Calendar.HOUR_OF_DAY); + int minutes = calendar.get(Calendar.MINUTE); + int seconds = calendar.get(Calendar.SECOND); + + return hours + minutes / 60. + seconds / 3600.; } private long syncStart(double startHour) { From efb71815b3e6ad7e033454043074d3c6fb55784f Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:45:19 +0200 Subject: [PATCH 06/38] Ignore eclipse project files --- .gitignore | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 30caf63..2f4b166 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,10 @@ .DS_Store* ehthumbs.db Icon? -Thumbs.db \ No newline at end of file +Thumbs.db +/bin/ + +.classpath +*.project +.settings/org.eclipse.jdt.core.prefs +*.prefs \ No newline at end of file From b4bdc6113159e24af4cca80157a510e5938d366e Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:54:29 +0200 Subject: [PATCH 07/38] You don't need to check for command name This executor will only be run if the command == sbackup --- src/com/exolius/simplebackup/Commands.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index 926688f..e8e9209 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -16,17 +16,14 @@ public Commands(SimpleBackup plugin) { --------------------------------------------------------*/ @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { - if (cmd.getName().equalsIgnoreCase("sbackup")) { - if (sender.hasPermission("simplebackup.use")) { - new Thread(new Runnable() { - @Override - public void run() { - plugin.doBackup(); - } - }).start(); - } - return true; + if (sender.hasPermission("simplebackup.use")) { + new Thread(new Runnable() { + @Override + public void run() { + plugin.doBackup(); + } + }).start(); } - return false; + return true; } } \ No newline at end of file From afc70cd38e7e42e80dc10a73697004c6d3b22613 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 16:55:28 +0200 Subject: [PATCH 08/38] Send a message if the sender doesn't have permission --- src/com/exolius/simplebackup/Commands.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index e8e9209..b028de0 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -1,5 +1,6 @@ package com.exolius.simplebackup; +import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -23,7 +24,10 @@ public void run() { plugin.doBackup(); } }).start(); + } else { + sender.sendMessage(ChatColor.RED + "You don't have permission to execute this command."); } + return true; } } \ No newline at end of file From 854cc8e2cd04ed31c06b222350dfbc0e67795607 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 17:02:37 +0200 Subject: [PATCH 09/38] Update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7271cec..a4464df 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -*CURRENT BUILD: Bukkit 1.10.x +CURRENT BUILD: Bukkit 1.12 ================================ +**Should work on 1.7-1.12** Since simple save is no longer available, I was looking for a nice simple way to back up my server maps with minimal configuration. Just set the folder and the interval, and your away. Most of the plugins I found had too many features for such a simple task (in my own opinion) so I decided to create this little plugin. From 5a625d10269710fa6c2382f3e9143f8d6e3f162a Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 8 Jun 2017 20:36:50 +0200 Subject: [PATCH 10/38] Return false instead of sending message --- src/com/exolius/simplebackup/Commands.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index b028de0..bd3416c 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -25,9 +25,9 @@ public void run() { } }).start(); } else { - sender.sendMessage(ChatColor.RED + "You don't have permission to execute this command."); + return false; } return true; } -} \ No newline at end of file +} From f68ca200ebecbba78a1e59bc1d6d341e5f8e7600 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 20:47:06 +0200 Subject: [PATCH 11/38] Convert indentations to spaces Because everyone seems to like spaces better --- pom.xml | 82 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/pom.xml b/pom.xml index 2687bbf..7140cf4 100644 --- a/pom.xml +++ b/pom.xml @@ -1,48 +1,48 @@ - 4.0.0 - com.exolius.simplebackup - SimpleBackup - 1.8 - - src + 4.0.0 + com.exolius.simplebackup + SimpleBackup + 1.8 + + src - - - src - true - - **/*.java - - - + + + src + true + + **/*.java + + + - - - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - - - + + + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + + + - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + - - - - org.spigotmc - spigot-api - 1.12-R0.1-SNAPSHOT - provided - - + + + + org.spigotmc + spigot-api + 1.12-R0.1-SNAPSHOT + provided + + From c1ac079f9578c010dc3dd67d98a8a3d035a22629 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 20:50:12 +0200 Subject: [PATCH 12/38] Remove unused import --- src/com/exolius/simplebackup/Commands.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index bd3416c..755f1e9 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -1,6 +1,5 @@ package com.exolius.simplebackup; -import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; From 5560a25e79f2dcec668120afa538024e0ef6a8a9 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 20:50:37 +0200 Subject: [PATCH 13/38] Move return true for better readability --- src/com/exolius/simplebackup/Commands.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index 755f1e9..be0d573 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -23,10 +23,9 @@ public void run() { plugin.doBackup(); } }).start(); + return true; } else { return false; } - - return true; } } From 48a73c7718d0a0a09b5aff6bc48f67df104e033c Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 20:53:36 +0200 Subject: [PATCH 14/38] Remove manifest file Only for runnable jar files - not for bukkit plugins --- src/META-INF/MANIFEST.MF | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 src/META-INF/MANIFEST.MF diff --git a/src/META-INF/MANIFEST.MF b/src/META-INF/MANIFEST.MF deleted file mode 100644 index 6216e18..0000000 --- a/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: com.exolius.simplebackup.SimpleBackup - From 0c44ed36a14fb9a2ceff4abb3e5b86100222f690 Mon Sep 17 00:00:00 2001 From: RobinMC Date: Thu, 8 Jun 2017 20:58:56 +0200 Subject: [PATCH 15/38] ammmmmmounts --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4464df..9fd121d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Plus more features as development goes on, but not too many because this is a si **Providing error reports:** -When pasting large ammounts of text please use [pastebin.com](http://pastebin.com). Its completely free and makes it easier for me to read any error messages you provide. You can even set it as a private paste so only people with the link can view it. +When pasting large amounts of text please use [pastebin.com](http://pastebin.com). Its completely free and makes it easier for me to read any error messages you provide. You can even set it as a private paste so only people with the link can view it. Also provide your SimpleBackup **config file** when stating you have a problem, so I can see if that's the problem instead. From 38473198a769427c83d7731a9ed5adee408b0618 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:23:03 +0200 Subject: [PATCH 16/38] Add backup prefix config option --- .../simplebackup/BackupFileManager.java | 25 ++- src/com/exolius/simplebackup/CopyBackup.java | 34 ++-- .../exolius/simplebackup/SimpleBackup.java | 192 +++++++++--------- src/com/exolius/simplebackup/ZipBackup.java | 56 ++--- src/config.yml | 3 + 5 files changed, 164 insertions(+), 146 deletions(-) diff --git a/src/com/exolius/simplebackup/BackupFileManager.java b/src/com/exolius/simplebackup/BackupFileManager.java index 57f8322..07a1e55 100644 --- a/src/com/exolius/simplebackup/BackupFileManager.java +++ b/src/com/exolius/simplebackup/BackupFileManager.java @@ -3,34 +3,39 @@ import java.io.File; import java.text.ParsePosition; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.Date; +import java.util.SortedSet; +import java.util.TreeSet; import java.util.logging.Logger; public abstract class BackupFileManager implements IBackupFileManager { + protected File backupFolder; + protected String backupPrefix; protected SimpleDateFormat fileNameDateFormat; protected Logger logger; - protected BackupFileManager(String backupFolder, String fileNameDateFormat, Logger logger) { + protected BackupFileManager(final String backupFolder, final String backupPrefix, final String fileNameDateFormat, final Logger logger) { this.backupFolder = new File(backupFolder); + this.backupPrefix = backupPrefix; this.fileNameDateFormat = new SimpleDateFormat(fileNameDateFormat); this.logger = logger; } - protected String formatDate(Date date) { - return fileNameDateFormat.format(date); + protected String formatDate(final Date date) { + return this.fileNameDateFormat.format(date); } @Override public SortedSet backupList() { - File[] files = backupFolder.listFiles(); + final File[] files = this.backupFolder.listFiles(); if (files == null) { - return new TreeSet(); + return new TreeSet<>(); } - SortedSet backups = new TreeSet(); - for (File file : files) { - Date date = fileNameDateFormat.parse(file.getName(), new ParsePosition(0)); - if (date != null && file.getName().equals(getFileName(date))) { + final SortedSet backups = new TreeSet<>(); + for (final File file : files) { + final Date date = this.fileNameDateFormat.parse(file.getName(), new ParsePosition(0)); + if (date != null && file.getName().equals(this.getFileName(date))) { backups.add(date); } } diff --git a/src/com/exolius/simplebackup/CopyBackup.java b/src/com/exolius/simplebackup/CopyBackup.java index 40bd609..502da5b 100644 --- a/src/com/exolius/simplebackup/CopyBackup.java +++ b/src/com/exolius/simplebackup/CopyBackup.java @@ -7,37 +7,37 @@ public class CopyBackup extends BackupFileManager { - public CopyBackup(String backupFolder, String fileNameDateFormat, Logger logger) { - super(backupFolder, fileNameDateFormat, logger); + public CopyBackup(final String backupFolder, final String backupPrefix, final String fileNameDateFormat, final Logger logger) { + super(backupFolder, backupPrefix, fileNameDateFormat, logger); } @Override - public String createBackup(Iterable worldFolders) throws IOException { - Date date = new Date(); - File destination = new File(backupFolder, getFileName(date)); - for (File worldFolder : worldFolders) { - logger.info("Backing up " + worldFolder); - FileUtils.copyFiles(worldFolder, new File(destination, worldFolder.getName()), logger); + public String createBackup(final Iterable worldFolders) throws IOException { + final Date date = new Date(); + final File destination = new File(this.backupFolder, this.getFileName(date)); + for (final File worldFolder : worldFolders) { + this.logger.info("Backing up " + worldFolder); + FileUtils.copyFiles(worldFolder, new File(destination, worldFolder.getName()), this.logger); } return destination.getAbsolutePath(); } @Override - public void deleteBackup(Date date) throws IOException { - File backupFile = new File(backupFolder, getFileName(date)); - logger.info("Deleting backup " + backupFile.getPath()); - deleteFile(backupFile); + public void deleteBackup(final Date date) throws IOException { + final File backupFile = new File(this.backupFolder, this.getFileName(date)); + this.logger.info("Deleting backup " + backupFile.getPath()); + this.deleteFile(backupFile); } @Override - protected String getFileName(Date date) { - return formatDate(date); + protected String getFileName(final Date date) { + return this.formatDate(date); } - void deleteFile(File f) throws IOException { + void deleteFile(final File f) throws IOException { if (f.isDirectory()) { - for (File c : f.listFiles()) { - deleteFile(c); + for (final File c : f.listFiles()) { + this.deleteFile(c); } } f.delete(); diff --git a/src/com/exolius/simplebackup/SimpleBackup.java b/src/com/exolius/simplebackup/SimpleBackup.java index a59b5bb..b117cbd 100644 --- a/src/com/exolius/simplebackup/SimpleBackup.java +++ b/src/com/exolius/simplebackup/SimpleBackup.java @@ -1,19 +1,24 @@ package com.exolius.simplebackup; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.World; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.plugin.java.JavaPlugin; - import java.io.File; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; import java.util.concurrent.Callable; import java.util.logging.Level; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.World; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.plugin.java.JavaPlugin; + public class SimpleBackup extends JavaPlugin { private double interval; private Double startHour; @@ -44,8 +49,8 @@ public class SimpleBackup extends JavaPlugin { -----------------------------------------*/ @Override public void onDisable() { - getServer().getScheduler().cancelTasks(this); - getLogger().info("Disabled SimpleBackup"); + this.getServer().getScheduler().cancelTasks(this); + this.getLogger().info("Disabled SimpleBackup"); } /*---------------------------------------- @@ -54,42 +59,42 @@ public void onDisable() { @Override public void onEnable() { // When plugin is enabled, load the "config.yml" - loadConfiguration(); + this.loadConfiguration(); - if (!backupEmpty) { - getServer().getPluginManager().registerEvents(loginListener, this); + if (!this.backupEmpty) { + this.getServer().getPluginManager().registerEvents(this.loginListener, this); } //Plugin commands - getCommand("sbackup").setExecutor(new Commands(this)); + this.getCommand("sbackup").setExecutor(new Commands(this)); // Shameless self promotion in the source code :D - if (selfPromotion) { - getLogger().info("Developed by Exolius"); + if (this.selfPromotion) { + this.getLogger().info("Developed by Exolius"); } // Set the backup interval, 72000.0D is 1 hour, multiplying it by the value interval will change the backup cycle time - long ticks = (long) (72000 * this.interval); + final long ticks = (long) (72000 * this.interval); if (ticks > 0) { - long delay = this.startHour != null ? syncStart(this.startHour) : ticks; + final long delay = this.startHour != null ? this.syncStart(this.startHour) : ticks; // Add the repeating task, set it to repeat the specified time this.getServer().getScheduler().runTaskTimerAsynchronously(this, new Runnable() { @Override public void run() { // When the task is run, start the map backup - if (backupEmpty || Bukkit.getServer().getOnlinePlayers().size() > 0 || loginListener.someoneWasOnline()) { - doBackup(); + if (SimpleBackup.this.backupEmpty || Bukkit.getServer().getOnlinePlayers().size() > 0 || SimpleBackup.this.loginListener.someoneWasOnline()) { + SimpleBackup.this.doBackup(); } else { - getLogger().info("Skipping backup (no one was online)"); + SimpleBackup.this.getLogger().info("Skipping backup (no one was online)"); } } }, delay, ticks); - getLogger().info("Backup scheduled starting in " + delay / 72000. + " hours, repeat interval: " + this.interval + " hours"); + this.getLogger().info("Backup scheduled starting in " + delay / 72000. + " hours, repeat interval: " + this.interval + " hours"); } // After enabling, print to console to say if it was successful - getLogger().info("Enabled."); + this.getLogger().info("Enabled."); } /*--------------------------------------------------------- @@ -97,55 +102,56 @@ public void run() { ---------------------------------------------------------*/ public void loadConfiguration() { // Set the config object - config = getConfig(); + this.config = this.getConfig(); // Set default values for variables - interval = config.getDouble("backup-interval-hours"); - broadcast = config.getBoolean("broadcast-message"); - backupFile = config.getString("backup-file"); - backupWorlds = config.getStringList("backup-worlds"); - additionalFolders = config.getStringList("backup-folders"); - dateFormat = config.getString("backup-date-format"); - backupEmpty = config.getBoolean("backup-empty-server"); - message = config.getString("backup-message"); - customMessage = config.getString("custom-backup-message"); - customMessageEnd = config.getString("custom-backup-message-end"); - backupCommand = config.getString("backup-completed-hook"); - disableZipping = config.getBoolean("disable-zipping"); - selfPromotion = config.getBoolean("self-promotion"); - String startTime = config.getString("start-time"); - List intervalsStr = config.getStringList("delete-schedule.intervals"); - List frequenciesStr = config.getStringList("delete-schedule.interval-frequencies"); + this.interval = this.config.getDouble("backup-interval-hours"); + this.broadcast = this.config.getBoolean("broadcast-message"); + this.backupFile = this.config.getString("backup-file"); + this.backupWorlds = this.config.getStringList("backup-worlds"); + this.additionalFolders = this.config.getStringList("backup-folders"); + this.dateFormat = this.config.getString("backup-date-format"); + this.backupEmpty = this.config.getBoolean("backup-empty-server"); + this.message = this.config.getString("backup-message"); + this.customMessage = this.config.getString("custom-backup-message"); + this.customMessageEnd = this.config.getString("custom-backup-message-end"); + this.backupCommand = this.config.getString("backup-completed-hook"); + this.disableZipping = this.config.getBoolean("disable-zipping"); + this.selfPromotion = this.config.getBoolean("self-promotion"); + final String startTime = this.config.getString("start-time"); + final List intervalsStr = this.config.getStringList("delete-schedule.intervals"); + final List frequenciesStr = this.config.getStringList("delete-schedule.interval-frequencies"); + final String backupPrefix = this.config.getString("backup-prefix", ""); //Save the configuration file - config.options().copyDefaults(true); - saveConfig(); + this.config.options().copyDefaults(true); + this.saveConfig(); - if (disableZipping) { - backupFileManager = new CopyBackup(backupFile, dateFormat, getLogger()); + if (this.disableZipping) { + this.backupFileManager = new CopyBackup(this.backupFile, backupPrefix, this.dateFormat, this.getLogger()); } else { - backupFileManager = new ZipBackup(backupFile, dateFormat, getLogger()); + this.backupFileManager = new ZipBackup(this.backupFile, backupPrefix, this.dateFormat, this.getLogger()); } - this.deleteSchedule = new DeleteSchedule(intervalsStr, frequenciesStr, backupFileManager, getLogger()); - Collection folders = foldersForBackup(); - Collection worlds = worldsForBackup(); - if (worlds.size() < backupWorlds.size()) { - getLogger().warning("Not all listed worlds are recognized."); + this.deleteSchedule = new DeleteSchedule(intervalsStr, frequenciesStr, this.backupFileManager, this.getLogger()); + final Collection folders = this.foldersForBackup(); + final Collection worlds = this.worldsForBackup(); + if (worlds.size() < this.backupWorlds.size()) { + this.getLogger().warning("Not all listed worlds are recognized."); } - if (folders.size() < additionalFolders.size()) { - getLogger().warning("Not all listed folders are recognized."); + if (folders.size() < this.additionalFolders.size()) { + this.getLogger().warning("Not all listed folders are recognized."); } - getLogger().info("Worlds " + worlds + " scheduled for backup."); + this.getLogger().info("Worlds " + worlds + " scheduled for backup."); if (!folders.isEmpty()) { - getLogger().info("Folders " + folders + " scheduled for backup."); + this.getLogger().info("Folders " + folders + " scheduled for backup."); } if (startTime != null) { try { - Date parsedTime = new SimpleDateFormat("HH:mm").parse(startTime); - startHour = hoursOf(parsedTime); - } catch (ParseException ignored) { - getLogger().warning("Can't parse time " + startTime); + final Date parsedTime = new SimpleDateFormat("HH:mm").parse(startTime); + this.startHour = this.hoursOf(parsedTime); + } catch (final ParseException ignored) { + this.getLogger().warning("Can't parse time " + startTime); } } } @@ -156,19 +162,19 @@ public void loadConfiguration() { public synchronized void doBackup() { // Begin backup of worlds // Broadcast the backup initialization if enabled - if (broadcast) { - getServer().getScheduler().runTask(this, new Runnable(){ + if (this.broadcast) { + this.getServer().getScheduler().runTask(this, new Runnable(){ @Override public void run() { - getServer().broadcastMessage(ChatColor.BLUE + message + " " + customMessage); + SimpleBackup.this.getServer().broadcastMessage(ChatColor.BLUE + SimpleBackup.this.message + " " + SimpleBackup.this.customMessage); }}); } // Loop through all the specified worlds and save them - List foldersToBackup = new ArrayList(); - for (final World world : worldsForBackup()) { + final List foldersToBackup = new ArrayList<>(); + for (final World world : this.worldsForBackup()) { world.setAutoSave(false); try { - getServer().getScheduler().callSyncMethod(this, new Callable() { + this.getServer().getScheduler().callSyncMethod(this, new Callable() { @Override public Object call() throws Exception { world.save(); @@ -176,51 +182,51 @@ public Object call() throws Exception { } }).get(); foldersToBackup.add(world.getWorldFolder()); - } catch (Exception e) { - getLogger().log(Level.WARNING, e.getMessage(), e); + } catch (final Exception e) { + this.getLogger().log(Level.WARNING, e.getMessage(), e); } } // additional folders, e.g. "plugins/" - foldersToBackup.addAll(foldersForBackup()); + foldersToBackup.addAll(this.foldersForBackup()); // zip/copy world folders String backupFile = null; try { - backupFile = backupFileManager.createBackup(foldersToBackup); - } catch (IOException e) { - getLogger().log(Level.WARNING, e.getMessage(), e); + backupFile = this.backupFileManager.createBackup(foldersToBackup); + } catch (final IOException e) { + this.getLogger().log(Level.WARNING, e.getMessage(), e); } // re-enable auto-save - for (World world : worldsForBackup()) { + for (final World world : this.worldsForBackup()) { world.setAutoSave(true); } // delete old backups try { - deleteSchedule.deleteOldBackups(); - } catch (IOException e) { - getLogger().log(Level.WARNING, e.getMessage(), e); + this.deleteSchedule.deleteOldBackups(); + } catch (final IOException e) { + this.getLogger().log(Level.WARNING, e.getMessage(), e); } // Broadcast the backup completion if enabled - if (broadcast) { - getServer().getScheduler().runTask(this, new Runnable(){ + if (this.broadcast) { + this.getServer().getScheduler().runTask(this, new Runnable(){ @Override public void run() { - getServer().broadcastMessage(ChatColor.BLUE + message + " " + customMessageEnd); + SimpleBackup.this.getServer().broadcastMessage(ChatColor.BLUE + SimpleBackup.this.message + " " + SimpleBackup.this.customMessageEnd); }}); } if(backupFile != null) { - loginListener.notifyBackupCreated(); - backupHooks.notifyBackupCreated(backupCommand, backupFile); + this.loginListener.notifyBackupCreated(); + this.backupHooks.notifyBackupCreated(this.backupCommand, backupFile); } } private Collection foldersForBackup() { - List result = new ArrayList(); - for (String additionalFolder : additionalFolders) { - File f = new File(".", additionalFolder); + final List result = new ArrayList<>(); + for (final String additionalFolder : this.additionalFolders) { + final File f = new File(".", additionalFolder); if (f.exists()) { result.add(f); } @@ -229,33 +235,33 @@ private Collection foldersForBackup() { } private Collection worldsForBackup() { - List worlds = new ArrayList(); - for (World world : getServer().getWorlds()) { - if (backupWorlds.isEmpty() || backupWorlds.contains(world.getName())) { + final List worlds = new ArrayList<>(); + for (final World world : this.getServer().getWorlds()) { + if (this.backupWorlds.isEmpty() || this.backupWorlds.contains(world.getName())) { worlds.add(world); } } return worlds; } - private double hoursOf(Date parsedTime) { - Calendar calendar = GregorianCalendar.getInstance(); + private double hoursOf(final Date parsedTime) { + final Calendar calendar = GregorianCalendar.getInstance(); calendar.setTime(parsedTime); - int hours = calendar.get(Calendar.HOUR_OF_DAY); - int minutes = calendar.get(Calendar.MINUTE); - int seconds = calendar.get(Calendar.SECOND); + final int hours = calendar.get(Calendar.HOUR_OF_DAY); + final int minutes = calendar.get(Calendar.MINUTE); + final int seconds = calendar.get(Calendar.SECOND); return hours + minutes / 60. + seconds / 3600.; } - private long syncStart(double startHour) { - double now = hoursOf(new Date()); + private long syncStart(final double startHour) { + final double now = this.hoursOf(new Date()); double diff = now - startHour; if (diff < 0) { diff += 24; } - double intervalPart = diff - Math.floor(diff / interval) * interval; - double remaining = interval - intervalPart; + final double intervalPart = diff - Math.floor(diff / this.interval) * this.interval; + final double remaining = this.interval - intervalPart; return (long) (remaining * 72000); } diff --git a/src/com/exolius/simplebackup/ZipBackup.java b/src/com/exolius/simplebackup/ZipBackup.java index 1ff07bc..7857216 100644 --- a/src/com/exolius/simplebackup/ZipBackup.java +++ b/src/com/exolius/simplebackup/ZipBackup.java @@ -1,6 +1,10 @@ package com.exolius.simplebackup; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.net.URI; import java.util.Date; import java.util.logging.Level; @@ -10,63 +14,63 @@ public class ZipBackup extends BackupFileManager { - public ZipBackup(String backupFolder, String fileNameDateFormat, Logger logger) { - super(backupFolder, fileNameDateFormat, logger); + public ZipBackup(final String backupFolder, final String backupPrefix, final String fileNameDateFormat, final Logger logger) { + super(backupFolder, backupPrefix, fileNameDateFormat, logger); } @Override - public String createBackup(Iterable worldFolders) throws IOException { - if (!backupFolder.exists()) { - backupFolder.mkdirs(); + public String createBackup(final Iterable worldFolders) throws IOException { + if (!this.backupFolder.exists()) { + this.backupFolder.mkdirs(); } - Date date = new Date(); - File backupFile = new File(backupFolder, getFileName(date)); - ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(backupFile)); + final Date date = new Date(); + final File backupFile = new File(this.backupFolder, this.getFileName(date)); + final ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(backupFile)); try { - for (File worldFolder : worldFolders) { - logger.info("Backing up " + worldFolder); - zipFiles(worldFolder.getParentFile().toURI(), worldFolder, zip); + for (final File worldFolder : worldFolders) { + this.logger.info("Backing up " + worldFolder); + this.zipFiles(worldFolder.getParentFile().toURI(), worldFolder, zip); } } finally { try { zip.close(); - } catch (IOException e) { - logger.log(Level.FINE, e.getMessage(), e); + } catch (final IOException e) { + this.logger.log(Level.FINE, e.getMessage(), e); } } return backupFile.getAbsolutePath(); } @Override - public void deleteBackup(Date date) { - File backupFile = new File(backupFolder, getFileName(date)); - logger.info("Deleting backup " + backupFile.getPath()); + public void deleteBackup(final Date date) { + final File backupFile = new File(this.backupFolder, this.getFileName(date)); + this.logger.info("Deleting backup " + backupFile.getPath()); backupFile.delete(); } @Override - protected String getFileName(Date date) { - return formatDate(date) + ".zip"; + protected String getFileName(final Date date) { + return this.backupPrefix + this.formatDate(date) + ".zip"; } - private void zipFiles(URI root, File source, ZipOutputStream zip) throws IOException { + private void zipFiles(final URI root, final File source, final ZipOutputStream zip) throws IOException { if (source.isDirectory()) { - for (String file : source.list()) { - zipFiles(root, new File(source, file), zip); + for (final String file : source.list()) { + this.zipFiles(root, new File(source, file), zip); } } else { - ZipEntry entry = new ZipEntry(root.relativize(source.toURI()).getPath()); + final ZipEntry entry = new ZipEntry(root.relativize(source.toURI()).getPath()); zip.putNextEntry(entry); InputStream in = null; try { in = new FileInputStream(source); - byte[] buffer = new byte[4096]; + final byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = in.read(buffer)) > 0) { zip.write(buffer, 0, bytesRead); } - } catch (IOException e) { - logger.warning("Unable to backup file: " + source.getAbsolutePath() + "(" + e.getMessage() + ")"); + } catch (final IOException e) { + this.logger.warning("Unable to backup file: " + source.getAbsolutePath() + "(" + e.getMessage() + ")"); } finally { if (in != null) { in.close(); diff --git a/src/config.yml b/src/config.yml index bd323ad..cf172a9 100644 --- a/src/config.yml +++ b/src/config.yml @@ -84,3 +84,6 @@ backup-message: '[SimpleBackup]' custom-backup-message: Backup starting custom-backup-message-end: Backup completed backup-completed-hook: '' + +# Prefix added to backup zip files +backup-prefix: '' \ No newline at end of file From d7aed86385da9ec23d77540f022bf759b13a1a5a Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:24:40 +0200 Subject: [PATCH 17/38] Update branding --- src/plugin.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugin.yml b/src/plugin.yml index 471b31e..f25f623 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,9 @@ -name: SimpleBackup +name: SimpleBackupReloaded main: com.exolius.simplebackup.SimpleBackup version: ${project.version} +description: Updated version of the original SimpleBackup plugin by Exolius +author: Derkades +authors: [Exolius] commands: sbackup: From 78cd51c5a65d909b1ab5e1920e38bd700d489cd3 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:24:46 +0200 Subject: [PATCH 18/38] Target java 8 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7140cf4..4951200 100644 --- a/pom.xml +++ b/pom.xml @@ -21,8 +21,8 @@ maven-compiler-plugin 2.3.2 - 1.7 - 1.7 + 1.8 + 1.8 From 40096ab0c960c93c51f39d8cf4169b9ae7d99412 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:26:27 +0200 Subject: [PATCH 19/38] Reorganising and formatting --- src/com/exolius/simplebackup/BackupHooks.java | 21 ++++++++++--------- src/com/exolius/simplebackup/Commands.java | 12 +++++------ .../exolius/simplebackup/SimpleBackup.java | 3 +++ .../{ => manager}/BackupFileManager.java | 4 +++- .../{ => manager}/CopyBackup.java | 4 +++- .../simplebackup/{ => manager}/ZipBackup.java | 2 +- .../simplebackup/{ => util}/FileUtils.java | 2 +- 7 files changed, 27 insertions(+), 21 deletions(-) rename src/com/exolius/simplebackup/{ => manager}/BackupFileManager.java (94%) rename src/com/exolius/simplebackup/{ => manager}/CopyBackup.java (94%) rename src/com/exolius/simplebackup/{ => manager}/ZipBackup.java (98%) rename src/com/exolius/simplebackup/{ => util}/FileUtils.java (98%) diff --git a/src/com/exolius/simplebackup/BackupHooks.java b/src/com/exolius/simplebackup/BackupHooks.java index 0d5df32..247788e 100644 --- a/src/com/exolius/simplebackup/BackupHooks.java +++ b/src/com/exolius/simplebackup/BackupHooks.java @@ -2,14 +2,15 @@ public class BackupHooks { - public void notifyBackupCreated(String command, String filename) { - if(!command.isEmpty()) { - try { - ProcessBuilder pb = new ProcessBuilder(command, filename); - pb.start(); - } catch(Exception ex) { - - } - } - } + public void notifyBackupCreated(final String command, final String filename) { + if (!command.isEmpty()) { + try { + final ProcessBuilder pb = new ProcessBuilder(command, filename); + pb.start(); + } catch (final Exception ex) { + + } + } + } + } diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index be0d573..bad2ee4 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -5,22 +5,20 @@ import org.bukkit.command.CommandSender; public class Commands implements CommandExecutor { - private SimpleBackup plugin; - public Commands(SimpleBackup plugin) { + private final SimpleBackup plugin; + + public Commands(final SimpleBackup plugin) { this.plugin = plugin; } - /*------------------------------------------------------- - This is ran when the plugin command is sent by a player - --------------------------------------------------------*/ @Override - public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) { if (sender.hasPermission("simplebackup.use")) { new Thread(new Runnable() { @Override public void run() { - plugin.doBackup(); + Commands.this.plugin.doBackup(); } }).start(); return true; diff --git a/src/com/exolius/simplebackup/SimpleBackup.java b/src/com/exolius/simplebackup/SimpleBackup.java index b117cbd..c2769ca 100644 --- a/src/com/exolius/simplebackup/SimpleBackup.java +++ b/src/com/exolius/simplebackup/SimpleBackup.java @@ -19,6 +19,9 @@ import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.plugin.java.JavaPlugin; +import com.exolius.simplebackup.manager.CopyBackup; +import com.exolius.simplebackup.manager.ZipBackup; + public class SimpleBackup extends JavaPlugin { private double interval; private Double startHour; diff --git a/src/com/exolius/simplebackup/BackupFileManager.java b/src/com/exolius/simplebackup/manager/BackupFileManager.java similarity index 94% rename from src/com/exolius/simplebackup/BackupFileManager.java rename to src/com/exolius/simplebackup/manager/BackupFileManager.java index 07a1e55..7fe7332 100644 --- a/src/com/exolius/simplebackup/BackupFileManager.java +++ b/src/com/exolius/simplebackup/manager/BackupFileManager.java @@ -1,4 +1,4 @@ -package com.exolius.simplebackup; +package com.exolius.simplebackup.manager; import java.io.File; import java.text.ParsePosition; @@ -8,6 +8,8 @@ import java.util.TreeSet; import java.util.logging.Logger; +import com.exolius.simplebackup.IBackupFileManager; + public abstract class BackupFileManager implements IBackupFileManager { protected File backupFolder; diff --git a/src/com/exolius/simplebackup/CopyBackup.java b/src/com/exolius/simplebackup/manager/CopyBackup.java similarity index 94% rename from src/com/exolius/simplebackup/CopyBackup.java rename to src/com/exolius/simplebackup/manager/CopyBackup.java index 502da5b..56c9457 100644 --- a/src/com/exolius/simplebackup/CopyBackup.java +++ b/src/com/exolius/simplebackup/manager/CopyBackup.java @@ -1,10 +1,12 @@ -package com.exolius.simplebackup; +package com.exolius.simplebackup.manager; import java.io.File; import java.io.IOException; import java.util.Date; import java.util.logging.Logger; +import com.exolius.simplebackup.util.FileUtils; + public class CopyBackup extends BackupFileManager { public CopyBackup(final String backupFolder, final String backupPrefix, final String fileNameDateFormat, final Logger logger) { diff --git a/src/com/exolius/simplebackup/ZipBackup.java b/src/com/exolius/simplebackup/manager/ZipBackup.java similarity index 98% rename from src/com/exolius/simplebackup/ZipBackup.java rename to src/com/exolius/simplebackup/manager/ZipBackup.java index 7857216..136831a 100644 --- a/src/com/exolius/simplebackup/ZipBackup.java +++ b/src/com/exolius/simplebackup/manager/ZipBackup.java @@ -1,4 +1,4 @@ -package com.exolius.simplebackup; +package com.exolius.simplebackup.manager; import java.io.File; import java.io.FileInputStream; diff --git a/src/com/exolius/simplebackup/FileUtils.java b/src/com/exolius/simplebackup/util/FileUtils.java similarity index 98% rename from src/com/exolius/simplebackup/FileUtils.java rename to src/com/exolius/simplebackup/util/FileUtils.java index 2e857a1..bcd45a3 100644 --- a/src/com/exolius/simplebackup/FileUtils.java +++ b/src/com/exolius/simplebackup/util/FileUtils.java @@ -1,4 +1,4 @@ -package com.exolius.simplebackup; +package com.exolius.simplebackup.util; import java.io.File; import java.io.FileInputStream; From 07f7902ea26e81a9ae9aa0666cccd9e68aaea41c Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:27:18 +0200 Subject: [PATCH 20/38] Use bukkit scheduler instead of java threads --- src/com/exolius/simplebackup/Commands.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/com/exolius/simplebackup/Commands.java b/src/com/exolius/simplebackup/Commands.java index bad2ee4..ec1c8fe 100644 --- a/src/com/exolius/simplebackup/Commands.java +++ b/src/com/exolius/simplebackup/Commands.java @@ -1,5 +1,6 @@ package com.exolius.simplebackup; +import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -15,12 +16,7 @@ public Commands(final SimpleBackup plugin) { @Override public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) { if (sender.hasPermission("simplebackup.use")) { - new Thread(new Runnable() { - @Override - public void run() { - Commands.this.plugin.doBackup(); - } - }).start(); + Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> Commands.this.plugin.doBackup()); return true; } else { return false; From 0649b587f844e28be938e008278cc74c300e86b5 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:27:38 +0200 Subject: [PATCH 21/38] Move to util package --- src/com/exolius/simplebackup/SimpleBackup.java | 1 + src/com/exolius/simplebackup/{ => util}/DeleteSchedule.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) rename src/com/exolius/simplebackup/{ => util}/DeleteSchedule.java (98%) diff --git a/src/com/exolius/simplebackup/SimpleBackup.java b/src/com/exolius/simplebackup/SimpleBackup.java index c2769ca..193264f 100644 --- a/src/com/exolius/simplebackup/SimpleBackup.java +++ b/src/com/exolius/simplebackup/SimpleBackup.java @@ -21,6 +21,7 @@ import com.exolius.simplebackup.manager.CopyBackup; import com.exolius.simplebackup.manager.ZipBackup; +import com.exolius.simplebackup.util.DeleteSchedule; public class SimpleBackup extends JavaPlugin { private double interval; diff --git a/src/com/exolius/simplebackup/DeleteSchedule.java b/src/com/exolius/simplebackup/util/DeleteSchedule.java similarity index 98% rename from src/com/exolius/simplebackup/DeleteSchedule.java rename to src/com/exolius/simplebackup/util/DeleteSchedule.java index 9c4d410..9037851 100644 --- a/src/com/exolius/simplebackup/DeleteSchedule.java +++ b/src/com/exolius/simplebackup/util/DeleteSchedule.java @@ -1,4 +1,4 @@ -package com.exolius.simplebackup; +package com.exolius.simplebackup.util; import java.io.IOException; import java.util.ArrayList; @@ -12,6 +12,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import com.exolius.simplebackup.IBackupFileManager; + public class DeleteSchedule { private List intervals; From d09439ea0c0f0efcd1095d202634b84635bb7523 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:31:55 +0200 Subject: [PATCH 22/38] Put comments with their options instead of together at the top of the config --- src/config.yml | 85 +++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 50 deletions(-) diff --git a/src/config.yml b/src/config.yml index cf172a9..9c9a594 100644 --- a/src/config.yml +++ b/src/config.yml @@ -1,28 +1,30 @@ +# The time of day to make backups (makes sense with daily backups) +start-time: '03:00' + # Interval between map saves in hours, 0.25 is 15 minutes, 1.0 is 1 hour and so on. (1 hour is default). -# backup-interval-hours: 1.0 -# # +backup-interval-hours: 1.0 + # List of worlds to backup, leave it empty to backup all worlds -# backup-worlds: -# # +backup-worlds: [] + # List of additional folders to backup (relative paths only). The 'plugins' folder can contain open or locked files! # Depending on what plugins you have installed, it may not be a good idea to try to backup that folder. # Usually plugins that write a large amounts of data frequently (like some loggers) are risky. -# backup-folders: -# - plugins -# # +backup-folders: + # The folder where backups are stored. Can be absolute path or relative to the working directory. -# backup-file: backups/ -# # +backup-file: backups/ + # The backup file name. See Java's SimpleDateFormat for formatting help. -# backup-date-format: yyyy-MM-dd-HH-mm-ss -# # +backup-date-format: yyyy-MM-dd-HH-mm-ss + # Should a backup be created if no one was online since the last backup? -# backup-empty-server: false -# # +backup-empty-server: false + # If zipping is disabled, the world files will be copied to a folder. # If zipping is enabled, the world files will be compressed in a zip file. -# disable-zipping: false -# # +disable-zipping: false + # Backup delete schedule # For each interval a desired backup frequency is specified, for example: # delete-schedule: @@ -40,48 +42,31 @@ # for backups older than 6 months + 4 weeks + 3 days, do not keep any; # Supported symbols are ('h' = hour, 'd' = day, 'w' = week, 'm' = month, 'y' = year). # Fractional numbers are not supported. -# # +delete-schedule: + intervals: + - 1d + - 3d + - 4w + - 30w + interval-frequencies: + - 4h + - 1d + - 5d + - 30d + # true if a message should be broadcast when backup starts or ends -# broadcast-message: true -# # +broadcast-message: true + # Message tag shown in the chat when the server is backing up. # Example: if the message was set to '[Bukkit is awesome]' you # would see "[Bukkit is awesome] Starting Backup" when the # plugin backs up -# backup-message: '[SimpleBackup]' -# # -# The 'backup starting' message that is broadcast when backup starts -# custom-backup-message: Backup starting -# # -# The 'backup completed' message that is broadcast when backup ends -# custom-backup-message-end: Backup completed -# # -# The time of day to make backups (makes sense with daily backups) -# start-time: '03:00' -# # +backup-message: '[Backup]' -backup-interval-hours: 1.0 -backup-worlds: -backup-folders: -backup-file: backups/ -backup-date-format: yyyy-MM-dd-HH-mm-ss -backup-empty-server: false -disable-zipping: false -delete-schedule: - intervals: - - 1d - - 3d - - 4w - - 30w - interval-frequencies: - - 4h - - 1d - - 5d - - 30d - -broadcast-message: true -backup-message: '[SimpleBackup]' +# The 'backup starting' message that is broadcast when backup starts custom-backup-message: Backup starting + +# The 'backup completed' message that is broadcast when backup ends custom-backup-message-end: Backup completed backup-completed-hook: '' From da6c0f0793a7581f9d0aa230cba6396fd0771f47 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:34:41 +0200 Subject: [PATCH 23/38] Compile against spigot 1.8.8 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4951200..537ed9a 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.exolius.simplebackup SimpleBackup - 1.8 + 1.9 src @@ -40,7 +40,7 @@ org.spigotmc spigot-api - 1.12-R0.1-SNAPSHOT + 1.8.8-R0.1-SNAPSHOT provided From aec977a587bef47f746b050ef2e54848cf1c4892 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:41:01 +0200 Subject: [PATCH 24/38] Pom formatting and name change --- pom.xml | 99 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/pom.xml b/pom.xml index 537ed9a..2205701 100644 --- a/pom.xml +++ b/pom.xml @@ -1,48 +1,55 @@ - - 4.0.0 - com.exolius.simplebackup - SimpleBackup - 1.9 - - src - - - - src - true - - **/*.java - - - - - - - maven-compiler-plugin - 2.3.2 - - 1.8 - 1.8 - - - - - - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - - - - - org.spigotmc - spigot-api - 1.8.8-R0.1-SNAPSHOT - provided - - + + 4.0.0 + com.exolius.simplebackup + simplebackup + 1.9 + + SimpleBackupReloaded + + + ${project.name}-${project.version} + + src + + + + src + true + + **/*.java + + + + + + + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + + + + + org.spigotmc + spigot-api + 1.8.8-R0.1-SNAPSHOT + provided + + From 8cd7d0ed27ab219b9af83a1cc1cf7d2f82bd4e64 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 13 Aug 2019 14:41:20 +0200 Subject: [PATCH 25/38] Print world names instead of world objects --- .../exolius/simplebackup/SimpleBackup.java | 46 +++++++------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/src/com/exolius/simplebackup/SimpleBackup.java b/src/com/exolius/simplebackup/SimpleBackup.java index 193264f..9fc7067 100644 --- a/src/com/exolius/simplebackup/SimpleBackup.java +++ b/src/com/exolius/simplebackup/SimpleBackup.java @@ -10,8 +10,8 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.List; -import java.util.concurrent.Callable; import java.util.logging.Level; +import java.util.stream.Collectors; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -83,17 +83,14 @@ public void onEnable() { if (ticks > 0) { final long delay = this.startHour != null ? this.syncStart(this.startHour) : ticks; // Add the repeating task, set it to repeat the specified time - this.getServer().getScheduler().runTaskTimerAsynchronously(this, new Runnable() { - @Override - public void run() { - // When the task is run, start the map backup - if (SimpleBackup.this.backupEmpty || Bukkit.getServer().getOnlinePlayers().size() > 0 || SimpleBackup.this.loginListener.someoneWasOnline()) { - SimpleBackup.this.doBackup(); - } else { - SimpleBackup.this.getLogger().info("Skipping backup (no one was online)"); - } - } - }, delay, ticks); + this.getServer().getScheduler().runTaskTimerAsynchronously(this, () -> { + // When the task is run, start the map backup + if (SimpleBackup.this.backupEmpty || Bukkit.getServer().getOnlinePlayers().size() > 0 || SimpleBackup.this.loginListener.someoneWasOnline()) { + SimpleBackup.this.doBackup(); + } else { + SimpleBackup.this.getLogger().info("Skipping backup (no one was online)"); + } + }, delay, ticks); this.getLogger().info("Backup scheduled starting in " + delay / 72000. + " hours, repeat interval: " + this.interval + " hours"); } @@ -146,7 +143,7 @@ public void loadConfiguration() { if (folders.size() < this.additionalFolders.size()) { this.getLogger().warning("Not all listed folders are recognized."); } - this.getLogger().info("Worlds " + worlds + " scheduled for backup."); + this.getLogger().info("Worlds " + worlds.stream().map(World::getName).collect(Collectors.toList()) + " scheduled for backup."); if (!folders.isEmpty()) { this.getLogger().info("Folders " + folders + " scheduled for backup."); } @@ -167,24 +164,17 @@ public synchronized void doBackup() { // Begin backup of worlds // Broadcast the backup initialization if enabled if (this.broadcast) { - this.getServer().getScheduler().runTask(this, new Runnable(){ - @Override - public void run() { - SimpleBackup.this.getServer().broadcastMessage(ChatColor.BLUE + SimpleBackup.this.message + " " + SimpleBackup.this.customMessage); - }}); + this.getServer().getScheduler().runTask(this, () -> SimpleBackup.this.getServer().broadcastMessage(ChatColor.BLUE + SimpleBackup.this.message + " " + SimpleBackup.this.customMessage)); } // Loop through all the specified worlds and save them final List foldersToBackup = new ArrayList<>(); for (final World world : this.worldsForBackup()) { world.setAutoSave(false); try { - this.getServer().getScheduler().callSyncMethod(this, new Callable() { - @Override - public Object call() throws Exception { - world.save(); - return null; - } - }).get(); + this.getServer().getScheduler().callSyncMethod(this, () -> { + world.save(); + return null; + }).get(); foldersToBackup.add(world.getWorldFolder()); } catch (final Exception e) { this.getLogger().log(Level.WARNING, e.getMessage(), e); @@ -215,11 +205,7 @@ public Object call() throws Exception { // Broadcast the backup completion if enabled if (this.broadcast) { - this.getServer().getScheduler().runTask(this, new Runnable(){ - @Override - public void run() { - SimpleBackup.this.getServer().broadcastMessage(ChatColor.BLUE + SimpleBackup.this.message + " " + SimpleBackup.this.customMessageEnd); - }}); + this.getServer().getScheduler().runTask(this, () -> SimpleBackup.this.getServer().broadcastMessage(ChatColor.BLUE + SimpleBackup.this.message + " " + SimpleBackup.this.customMessageEnd)); } if(backupFile != null) { this.loginListener.notifyBackupCreated(); From a810381952eadc69ab2c028bb77e42d8c2e1a602 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 23 Aug 2019 00:20:40 +0200 Subject: [PATCH 26/38] Delete old 'configuring' file --- configuring | 83 ----------------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 configuring diff --git a/configuring b/configuring deleted file mode 100644 index 350767f..0000000 --- a/configuring +++ /dev/null @@ -1,83 +0,0 @@ - Interval between map saves in hours, 0.25 is 15 minutes, 1.0 is 1 hour and so on. (1 hour is default). -# backup-interval-hours: 1.0 -# # -# List of worlds to backup, leave it empty to backup all worlds -# backup-worlds: -# # -# List of additional folders to backup (relative paths only). The 'plugins' folder can contain open or locked files! -# Depending on what plugins you have installed, it may not be a good idea to try to backup that folder. -# Usually plugins that write a large amounts of data frequently (like some loggers) are risky. -# backup-folders: -# - plugins -# # -# The folder where backups are stored. Can be absolute path or relative to the working directory. -# backup-file: backups/ -# # -# The backup file name. See Java's SimpleDateFormat for formatting help. -# backup-date-format: yyyy-MM-dd-HH-mm-ss -# # -# Should a backup be created if no one was online since the last backup? -# backup-empty-server: false -# # -# If zipping is disabled, the world files will be copied to a folder. -# If zipping is enabled, the world files will be compressed in a zip file. -# disable-zipping: false -# # -# Backup delete schedule -# For each interval a desired backup frequency is specified, for example: -# delete-schedule: -# intervals: -# - 3d -# - 4w -# - 6m -# interval-frequencies: -# - 1d -# - 1w -# - 0 -# Translates to: -# for backups older than 3 days, leave only 1 backup per day; -# for backups older than 4 weeks + 3 days, leave only 1 backup per week; -# for backups older than 6 months + 4 weeks + 3 days, do not keep any; -# Supported symbols are ('h' = hour, 'd' = day, 'w' = week, 'm' = month, 'y' = year). -# Fractional numbers are not supported. -# # -# true if a message should be broadcast when backup starts or ends -# broadcast-message: true -# # -# Message tag shown in the chat when the server is backing up. -# Example: if the message was set to '[Bukkit is awesome]' you -# would see "[Bukkit is awesome] Starting Backup" when the -# plugin backs up -# backup-message: '[SimpleBackup]' -# # -# The 'backup starting' message that is broadcast when backup starts -# custom-backup-message: Backup starting -# # -# The 'backup completed' message that is broadcast when backup ends -# custom-backup-message-end: Backup completed -# # -#The plugin now has a permissions node as well, it defaults to OP's but you can grant other users access with 'simplebackup.use' - -backup-interval-hours: 1.0 -backup-worlds: -backup-folders: -backup-file: backups/ -backup-date-format: yyyy-MM-dd-HH-mm-ss -backup-empty-server: false -disable-zipping: false -delete-schedule: - intervals: - - 1d - - 3d - - 4w - - 30w - interval-frequencies: - - 4h - - 1d - - 5d - - 30d - -broadcast-message: true -backup-message: '[SimpleBackup]' -custom-backup-message: Backup starting -custom-backup-message-end: Backup completed \ No newline at end of file From 84dd638a3cccbe3f07087376c78549858726b423 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 23 Aug 2019 04:14:05 +0200 Subject: [PATCH 27/38] Load config properly --- .../exolius/simplebackup/SimpleBackup.java | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/src/com/exolius/simplebackup/SimpleBackup.java b/src/com/exolius/simplebackup/SimpleBackup.java index 9fc7067..43ba9e9 100644 --- a/src/com/exolius/simplebackup/SimpleBackup.java +++ b/src/com/exolius/simplebackup/SimpleBackup.java @@ -44,7 +44,6 @@ public class SimpleBackup extends JavaPlugin { private IBackupFileManager backupFileManager; private DeleteSchedule deleteSchedule; - protected FileConfiguration config; private final LoginListener loginListener = new LoginListener(); private final BackupHooks backupHooks= new BackupHooks(); @@ -62,7 +61,7 @@ public void onDisable() { -----------------------------------------*/ @Override public void onEnable() { - // When plugin is enabled, load the "config.yml" + this.saveDefaultConfig(); this.loadConfiguration(); if (!this.backupEmpty) { @@ -103,30 +102,26 @@ public void onEnable() { ---------------------------------------------------------*/ public void loadConfiguration() { // Set the config object - this.config = this.getConfig(); + final FileConfiguration config = this.getConfig(); // Set default values for variables - this.interval = this.config.getDouble("backup-interval-hours"); - this.broadcast = this.config.getBoolean("broadcast-message"); - this.backupFile = this.config.getString("backup-file"); - this.backupWorlds = this.config.getStringList("backup-worlds"); - this.additionalFolders = this.config.getStringList("backup-folders"); - this.dateFormat = this.config.getString("backup-date-format"); - this.backupEmpty = this.config.getBoolean("backup-empty-server"); - this.message = this.config.getString("backup-message"); - this.customMessage = this.config.getString("custom-backup-message"); - this.customMessageEnd = this.config.getString("custom-backup-message-end"); - this.backupCommand = this.config.getString("backup-completed-hook"); - this.disableZipping = this.config.getBoolean("disable-zipping"); - this.selfPromotion = this.config.getBoolean("self-promotion"); - final String startTime = this.config.getString("start-time"); - final List intervalsStr = this.config.getStringList("delete-schedule.intervals"); - final List frequenciesStr = this.config.getStringList("delete-schedule.interval-frequencies"); - final String backupPrefix = this.config.getString("backup-prefix", ""); - - //Save the configuration file - this.config.options().copyDefaults(true); - this.saveConfig(); + this.interval = config.getDouble("backup-interval-hours"); + this.broadcast = config.getBoolean("broadcast-message"); + this.backupFile = config.getString("backup-file"); + this.backupWorlds = config.getStringList("backup-worlds"); + this.additionalFolders = config.getStringList("backup-folders"); + this.dateFormat = config.getString("backup-date-format"); + this.backupEmpty = config.getBoolean("backup-empty-server"); + this.message = config.getString("backup-message"); + this.customMessage = config.getString("custom-backup-message"); + this.customMessageEnd = config.getString("custom-backup-message-end"); + this.backupCommand = config.getString("backup-completed-hook"); + this.disableZipping = config.getBoolean("disable-zipping"); + this.selfPromotion = config.getBoolean("self-promotion"); + final String startTime = config.getString("start-time"); + final List intervalsStr = config.getStringList("delete-schedule.intervals"); + final List frequenciesStr = config.getStringList("delete-schedule.interval-frequencies"); + final String backupPrefix = config.getString("backup-prefix", ""); if (this.disableZipping) { this.backupFileManager = new CopyBackup(this.backupFile, backupPrefix, this.dateFormat, this.getLogger()); From 0b33edbdf39b34be0bd60f25bebfc3619f43c13e Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 23 Aug 2019 04:14:13 +0200 Subject: [PATCH 28/38] Bump version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2205701..29660b7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.exolius.simplebackup simplebackup - 1.9 + 1.9.1 SimpleBackupReloaded From 2eadd8f03c25f5d01b15df59f7ce13b4749b79fd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2020 11:52:07 +0000 Subject: [PATCH 29/38] Bump maven-compiler-plugin from 2.3.2 to 3.8.1 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 2.3.2 to 3.8.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-2.3.2...maven-compiler-plugin-3.8.1) Signed-off-by: dependabot-preview[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29660b7..63671af 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 2.3.2 + 3.8.1 1.8 1.8 From fd0aa8dd52a54c14e7e591345a74530ac78fb692 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 22:26:24 +0000 Subject: [PATCH 30/38] Upgrade to GitHub-native Dependabot --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..67c3b85 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: +- package-ecosystem: maven + directory: "/" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 10 From 04fbea85d830233af2c1f12bd49f0e8d37eee4f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jan 2022 04:08:58 +0000 Subject: [PATCH 31/38] Bump maven-compiler-plugin from 3.8.1 to 3.9.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.1 to 3.9.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.9.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 63671af..a5ed319 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.8.1 + 3.9.0 1.8 1.8 From 5aef2f20082203170fe2343f6e0bd729e9fa017b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 04:11:26 +0000 Subject: [PATCH 32/38] Bump maven-compiler-plugin from 3.9.0 to 3.10.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.9.0...maven-compiler-plugin-3.10.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5ed319..3c83c8c 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.9.0 + 3.10.0 1.8 1.8 From 43e9b960a51a0d15d06618f044a52839aa4beb2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 04:09:58 +0000 Subject: [PATCH 33/38] Bump maven-compiler-plugin from 3.10.0 to 3.10.1 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.0 to 3.10.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.0...maven-compiler-plugin-3.10.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3c83c8c..f0d2dad 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.10.0 + 3.10.1 1.8 1.8 From 19d15d93f5d6e85d80cadcec9bf6014a0073fbdc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 04:58:54 +0000 Subject: [PATCH 34/38] Bump maven-compiler-plugin from 3.10.1 to 3.11.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f0d2dad..78da474 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 1.8 1.8 From 7f5311e8347bb3a3b9e5f5e1e0d5dcdfc727a132 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 22:13:21 +0100 Subject: [PATCH 35/38] Bump org.apache.maven.plugins:maven-compiler-plugin (#7) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.11.0 to 3.12.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.11.0...maven-compiler-plugin-3.12.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78da474..27953fe 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.11.0 + 3.12.0 1.8 1.8 From 471c2404a8d4493cf9751cea7ca06b424c788788 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Dec 2023 11:14:03 +0100 Subject: [PATCH 36/38] Bump org.apache.maven.plugins:maven-compiler-plugin (#8) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.0 to 3.12.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.0...maven-compiler-plugin-3.12.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 27953fe..f182226 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.12.0 + 3.12.1 1.8 1.8 From 73462cabc0fd1674f5017c34e61096e122043e66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:30:00 +0100 Subject: [PATCH 37/38] Bump org.apache.maven.plugins:maven-compiler-plugin (#9) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f182226..c33f959 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.12.1 + 3.13.0 1.8 1.8 From f236934cb7f022df727c37ed7f064341e596f4f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:05:23 +0100 Subject: [PATCH 38/38] Bump org.apache.maven.plugins:maven-compiler-plugin (#10) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.13.0 to 3.14.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c33f959..f710c8e 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ maven-compiler-plugin - 3.13.0 + 3.14.0 1.8 1.8