From aa5d95d72f036424dd449b8ba95cfc3f8903973b Mon Sep 17 00:00:00 2001 From: AppleDash Date: Mon, 11 Jul 2016 18:03:20 -0400 Subject: [PATCH] Restructure project and switch to Maven. --- .gitignore | 2 + README.md | 3 +- SaneEconomyCore/pom.xml | 74 +++++++++++++++++++ .../appledash/saneeconomy/SaneEconomy.java | 0 .../command/SaneEconomyCommand.java | 0 .../command/exception/CommandException.java | 0 .../exception/type/NoPermissionException.java | 0 .../type/usage/InvalidUsageException.java | 0 .../type/usage/NeedPlayerException.java | 0 .../type/usage/TooFewArgumentsException.java | 0 .../type/usage/TooManyArgumentsException.java | 0 .../exception/type/usage/UsageException.java | 0 .../command/type/BalanceCommand.java | 0 .../command/type/EconomyAdminCommand.java | 0 .../saneeconomy/command/type/PayCommand.java | 0 .../command/type/SaneEcoCommand.java | 0 .../saneeconomy/economy/Currency.java | 0 .../saneeconomy/economy/EconomyManager.java | 0 .../backend/EconomyStorageBackend.java | 0 .../type/EconomyStorageBackendFlatfile.java | 0 .../type/EconomyStorageBackendMySQL.java | 0 .../listeners/JoinQuitListener.java | 0 .../saneeconomy/utils/MessageUtils.java | 0 .../saneeconomy/utils/NumberUtils.java | 0 .../saneeconomy/vault/EconomySaneEconomy.java | 0 .../saneeconomy/vault/VaultHook.java | 0 .../src}/main/resources/config.yml | 0 .../src}/main/resources/plugin.yml | 0 build.gradle | 54 -------------- pom.xml | 36 +++++++++ settings.gradle | 2 - 31 files changed, 114 insertions(+), 57 deletions(-) create mode 100644 SaneEconomyCore/pom.xml rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/SaneEconomy.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/SaneEconomyCommand.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/CommandException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/type/NoPermissionException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/type/usage/InvalidUsageException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/type/usage/NeedPlayerException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooFewArgumentsException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooManyArgumentsException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/exception/type/usage/UsageException.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/type/BalanceCommand.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/type/EconomyAdminCommand.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/type/PayCommand.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/command/type/SaneEcoCommand.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/economy/Currency.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/economy/EconomyManager.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/economy/backend/EconomyStorageBackend.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendFlatfile.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendMySQL.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/listeners/JoinQuitListener.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/utils/MessageUtils.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/utils/NumberUtils.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/vault/EconomySaneEconomy.java (100%) rename {src => SaneEconomyCore/src}/main/java/org/appledash/saneeconomy/vault/VaultHook.java (100%) rename {src => SaneEconomyCore/src}/main/resources/config.yml (100%) rename {src => SaneEconomyCore/src}/main/resources/plugin.yml (100%) delete mode 100644 build.gradle create mode 100644 pom.xml delete mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore index 4e1dbb6..eba9e84 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ build/ RemoteSystemsTempFiles/.project *.iml *.eml +out/ +target/ diff --git a/README.md b/README.md index 92914b0..2fe3f09 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ I decided that it was time for a change. I wanted a working, updated economy plu ## Development -Our dependencies are managed with Gradle instead of Maven. Other than that, it's a pretty standard development workflow. +We manage dependencies with Maven. We try to stick to [SemVer](http://semver.org/), but it's rather difficult with a Bukkit plugin so in reality our version numbers are almost meaningless. Generally, new releases should be built against the latest Spigot/Bukkit at the time the release is published. + diff --git a/SaneEconomyCore/pom.xml b/SaneEconomyCore/pom.xml new file mode 100644 index 0000000..fb8a0e5 --- /dev/null +++ b/SaneEconomyCore/pom.xml @@ -0,0 +1,74 @@ + + + 4.0.0 + + org.appledash + SaneEconomy + 0.5.2-SNAPSHOT + + SaneEconomyCore + 0.5.2-SNAPSHOT + + + + net.milkbowl.vault + VaultAPI + 1.5 + + + + + ${project.artifactId} + + + src/main/resources + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4 + + + package + + shade + + + + + com.zaxxer:HikariCP + com.google.code.gson:gson + org.reflections:reflections + org.javassist:javassist + org.slf4j:slf4j-api + org.slf4j:slf4j-nop + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + ../out/ + + + + + diff --git a/src/main/java/org/appledash/saneeconomy/SaneEconomy.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/SaneEconomy.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/SaneEconomy.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/SaneEconomy.java diff --git a/src/main/java/org/appledash/saneeconomy/command/SaneEconomyCommand.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/SaneEconomyCommand.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/SaneEconomyCommand.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/SaneEconomyCommand.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/CommandException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/CommandException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/CommandException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/CommandException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/type/NoPermissionException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/NoPermissionException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/type/NoPermissionException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/NoPermissionException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/InvalidUsageException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/InvalidUsageException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/type/usage/InvalidUsageException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/InvalidUsageException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/NeedPlayerException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/NeedPlayerException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/type/usage/NeedPlayerException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/NeedPlayerException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooFewArgumentsException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooFewArgumentsException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooFewArgumentsException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooFewArgumentsException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooManyArgumentsException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooManyArgumentsException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooManyArgumentsException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/TooManyArgumentsException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/UsageException.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/UsageException.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/exception/type/usage/UsageException.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/exception/type/usage/UsageException.java diff --git a/src/main/java/org/appledash/saneeconomy/command/type/BalanceCommand.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/BalanceCommand.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/type/BalanceCommand.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/BalanceCommand.java diff --git a/src/main/java/org/appledash/saneeconomy/command/type/EconomyAdminCommand.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/EconomyAdminCommand.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/type/EconomyAdminCommand.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/EconomyAdminCommand.java diff --git a/src/main/java/org/appledash/saneeconomy/command/type/PayCommand.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/PayCommand.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/type/PayCommand.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/PayCommand.java diff --git a/src/main/java/org/appledash/saneeconomy/command/type/SaneEcoCommand.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/SaneEcoCommand.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/command/type/SaneEcoCommand.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/SaneEcoCommand.java diff --git a/src/main/java/org/appledash/saneeconomy/economy/Currency.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/Currency.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/economy/Currency.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/Currency.java diff --git a/src/main/java/org/appledash/saneeconomy/economy/EconomyManager.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/EconomyManager.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/economy/EconomyManager.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/EconomyManager.java diff --git a/src/main/java/org/appledash/saneeconomy/economy/backend/EconomyStorageBackend.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/backend/EconomyStorageBackend.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/economy/backend/EconomyStorageBackend.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/backend/EconomyStorageBackend.java diff --git a/src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendFlatfile.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendFlatfile.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendFlatfile.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendFlatfile.java diff --git a/src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendMySQL.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendMySQL.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendMySQL.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/backend/type/EconomyStorageBackendMySQL.java diff --git a/src/main/java/org/appledash/saneeconomy/listeners/JoinQuitListener.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/listeners/JoinQuitListener.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/listeners/JoinQuitListener.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/listeners/JoinQuitListener.java diff --git a/src/main/java/org/appledash/saneeconomy/utils/MessageUtils.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/MessageUtils.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/utils/MessageUtils.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/MessageUtils.java diff --git a/src/main/java/org/appledash/saneeconomy/utils/NumberUtils.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/NumberUtils.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/utils/NumberUtils.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/NumberUtils.java diff --git a/src/main/java/org/appledash/saneeconomy/vault/EconomySaneEconomy.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/vault/EconomySaneEconomy.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/vault/EconomySaneEconomy.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/vault/EconomySaneEconomy.java diff --git a/src/main/java/org/appledash/saneeconomy/vault/VaultHook.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/vault/VaultHook.java similarity index 100% rename from src/main/java/org/appledash/saneeconomy/vault/VaultHook.java rename to SaneEconomyCore/src/main/java/org/appledash/saneeconomy/vault/VaultHook.java diff --git a/src/main/resources/config.yml b/SaneEconomyCore/src/main/resources/config.yml similarity index 100% rename from src/main/resources/config.yml rename to SaneEconomyCore/src/main/resources/config.yml diff --git a/src/main/resources/plugin.yml b/SaneEconomyCore/src/main/resources/plugin.yml similarity index 100% rename from src/main/resources/plugin.yml rename to SaneEconomyCore/src/main/resources/plugin.yml diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 26d83fe..0000000 --- a/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -group 'org.appledash' -version '0.5.2-SNAPSHOT' - -apply plugin: 'java' - -sourceCompatibility = 1.8 - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' - } -} - -apply plugin: 'com.github.johnrengelman.shadow' - -shadowJar { - dependencies { - include(dependency('org.mcstats.bukkit:.*')) - } -} - -repositories { - mavenCentral() - - // Spigot/Bukkit - maven { - url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' - } - - // PluginMetrics - maven { - url 'http://repo.mcstats.org/content/repositories/public' - } - - // Sonatype - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - - // Vault - maven { - url 'http://nexus.theyeticave.net/content/repositories/pub_releases' - } -} - -dependencies { - compile group: 'org.spigotmc', name: 'spigot-api', version: '1.9-R0.1-SNAPSHOT' - compile group: 'org.bukkit', name: 'bukkit', version: '1.9-R0.1-SNAPSHOT' - compile group: 'org.mcstats.bukkit', name: 'metrics', version: 'R7' - compile group: 'net.milkbowl.vault', name: 'VaultAPI', version: '1.5' -} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..53f76d1 --- /dev/null +++ b/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + org.appledash + SaneEconomy + 0.5.2-SNAPSHOT + pom + + + SaneEconomyCore + + + + + spigot + Spigot + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + vault + Vault + http://nexus.theyeticave.net/content/repositories/pub_releases + + + + + + org.spigotmc + spigot-api + 1.10-R0.1-SNAPSHOT + + + diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 7ff6253..0000000 --- a/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'saneeconomy' -