diff --git a/bukkit/pom.xml b/bukkit/pom.xml
index 4cc4d0cd..fab8ac9d 100644
--- a/bukkit/pom.xml
+++ b/bukkit/pom.xml
@@ -86,7 +86,7 @@
org.spigotmc
spigot-api
- 1.12-R0.1-SNAPSHOT
+ 1.12.2-R0.1-SNAPSHOT
provided
diff --git a/common/pom.xml b/common/pom.xml
index f8209285..86289194 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -39,7 +39,7 @@
net.kyori
text
- 1.11-1.2.0
+ 1.11-1.3.0
compile
@@ -104,7 +104,7 @@
com.zaxxer
HikariCP
- 2.7.1
+ 2.7.3
provided
@@ -146,7 +146,7 @@
com.github.ben-manes.caffeine
caffeine
- 2.5.6
+ 2.6.0
provided
diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java
index b3700ea3..6cca7458 100644
--- a/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java
+++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java
@@ -32,13 +32,13 @@ import lombok.Getter;
@AllArgsConstructor
public enum Dependency {
- CAFFEINE("com.github.ben-manes.caffeine", "caffeine", "2.5.6"),
- MARIADB_DRIVER("org.mariadb.jdbc", "mariadb-java-client", "2.0.3"),
+ CAFFEINE("com.github.ben-manes.caffeine", "caffeine", "2.6.0"),
+ MARIADB_DRIVER("org.mariadb.jdbc", "mariadb-java-client", "2.2.0"),
MYSQL_DRIVER("mysql", "mysql-connector-java", "5.1.44"),
POSTGRESQL_DRIVER("org.postgresql", "postgresql", "9.4.1212"),
H2_DRIVER("com.h2database", "h2", "1.4.196"),
- SQLITE_DRIVER("org.xerial", "sqlite-jdbc", "3.20.0"),
- HIKARI("com.zaxxer", "HikariCP", "2.7.1"),
+ SQLITE_DRIVER("org.xerial", "sqlite-jdbc", "3.20.1"),
+ HIKARI("com.zaxxer", "HikariCP", "2.7.3"),
SLF4J_SIMPLE("org.slf4j", "slf4j-simple", "1.7.25"),
SLF4J_API("org.slf4j", "slf4j-api", "1.7.25"),
MONGODB_DRIVER("org.mongodb", "mongo-java-driver", "3.5.0"),
diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/HikariConnectionFactory.java b/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/HikariConnectionFactory.java
index 519a01fb..7cd7391f 100644
--- a/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/HikariConnectionFactory.java
+++ b/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/HikariConnectionFactory.java
@@ -48,9 +48,13 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
this.configuration = configuration;
}
- protected abstract String getDriverClass();
+ protected String getDriverClass() {
+ return null;
+ }
- protected abstract void appendProperties(HikariConfig config);
+ protected void appendProperties(HikariConfig config) {
+
+ }
protected void appendConfigurationInfo(HikariConfig config) {
String address = configuration.getAddress();
@@ -58,17 +62,13 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
address = addressSplit[0];
String port = addressSplit.length > 1 ? addressSplit[1] : "3306";
- String database = configuration.getDatabase();
- String username = configuration.getUsername();
- String password = configuration.getPassword();
-
config.setMaximumPoolSize(configuration.getPoolSize());
config.setDataSourceClassName(getDriverClass());
config.addDataSourceProperty("serverName", address);
config.addDataSourceProperty("port", port);
- config.addDataSourceProperty("databaseName", database);
- config.setUsername(username);
- config.setPassword(password);
+ config.addDataSourceProperty("databaseName", configuration.getDatabase());
+ config.setUsername(configuration.getUsername());
+ config.setPassword(configuration.getPassword());
}
@Override
diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/MySqlConnectionFactory.java b/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/MySqlConnectionFactory.java
index dd4318a6..087c9e90 100644
--- a/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/MySqlConnectionFactory.java
+++ b/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/MySqlConnectionFactory.java
@@ -35,8 +35,17 @@ public class MySqlConnectionFactory extends HikariConnectionFactory {
}
@Override
- protected String getDriverClass() {
- return "com.mysql.jdbc.jdbc2.optional.MysqlDataSource";
+ protected void appendConfigurationInfo(HikariConfig config) {
+ String address = configuration.getAddress();
+ String[] addressSplit = address.split(":");
+ address = addressSplit[0];
+ String port = addressSplit.length > 1 ? addressSplit[1] : "3306";
+ String database = configuration.getDatabase();
+
+ config.setMaximumPoolSize(configuration.getPoolSize());
+ config.setJdbcUrl("jdbc:mysql://" + address + ":" + port + "/" + database);
+ config.setUsername(configuration.getUsername());
+ config.setPassword(configuration.getPassword());
}
@Override
diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/PostgreConnectionFactory.java b/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/PostgreConnectionFactory.java
index 8a97adba..0ee660a4 100644
--- a/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/PostgreConnectionFactory.java
+++ b/common/src/main/java/me/lucko/luckperms/common/storage/dao/sql/connection/hikari/PostgreConnectionFactory.java
@@ -34,16 +34,6 @@ public class PostgreConnectionFactory extends HikariConnectionFactory {
super("PostgreSQL", configuration);
}
- @Override
- protected String getDriverClass() {
- return "org.postgresql.ds.PGSimpleDataSource";
- }
-
- @Override
- protected void appendProperties(HikariConfig config) {
-
- }
-
@Override
protected void appendConfigurationInfo(HikariConfig config) {
String address = configuration.getAddress();
@@ -56,7 +46,7 @@ public class PostgreConnectionFactory extends HikariConnectionFactory {
String password = configuration.getPassword();
config.setMaximumPoolSize(configuration.getPoolSize());
- config.setDataSourceClassName(getDriverClass());
+ config.setDataSourceClassName("org.postgresql.ds.PGSimpleDataSource");
config.addDataSourceProperty("serverName", address);
config.addDataSourceProperty("portNumber", port);
config.addDataSourceProperty("databaseName", database);