Bump dependency versions

This commit is contained in:
Luck 2017-11-10 20:16:44 +00:00
parent 22fba0c172
commit 17da2807cf
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
6 changed files with 29 additions and 30 deletions

View File

@ -86,7 +86,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12-R0.1-SNAPSHOT</version>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- Vault -->

View File

@ -39,7 +39,7 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>text</artifactId>
<version>1.11-1.2.0</version>
<version>1.11-1.3.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
@ -104,7 +104,7 @@
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.1</version>
<version>2.7.3</version>
<scope>provided</scope>
</dependency>
<!-- Jedis -->
@ -146,7 +146,7 @@
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.5.6</version>
<version>2.6.0</version>
<scope>provided</scope>
</dependency>
<!-- Lombok -->

View File

@ -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"),

View File

@ -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

View File

@ -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

View File

@ -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);