Fix postgres, SLF4J
This commit is contained in:
1 parent
e29e8b6e9f
commit
d06bb80891
3 files changed
+4
-1
No files matched your search
+1
-1
@@ -57,7 +57,7 @@ subprojects {
|
||||
tasks.register<Copy>("copyBukkitJarToRoot") {
|
||||
dependsOn(":bukkit:shadowJar")
|
||||
from(project(":bukkit").layout.buildDirectory.dir("libs")) {
|
||||
include("LightningGrim-bukkit-*.jar")
|
||||
include("LightningGrim-bukkit-$version.jar") // current build only; stale jars from prior commits would collide on rename
|
||||
rename("LightningGrim-bukkit-.*\\.jar", "LightningGrim-$baseVersion.jar")
|
||||
}
|
||||
into(layout.buildDirectory.dir("libs"))
|
||||
|
||||
@@ -10,6 +10,8 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
// The PostgreSQL JDBC driver is loaded reflectively via java.sql ServiceLoader,
|
||||
// so minimize() sees no direct references and would strip it. Keep it whole.
|
||||
exclude(dependency("org.postgresql:postgresql:.*"))
|
||||
// Same for the SLF4J NOP provider, loaded via SLF4JServiceProvider ServiceLoader.
|
||||
exclude(dependency("org.slf4j:slf4j-nop:.*"))
|
||||
}
|
||||
archiveFileName = "${rootProject.name}-${project.name}-${rootProject.version}.jar"
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
+1
@@ -31,6 +31,7 @@ public class PostgresqlViolationDatabase implements ViolationDatabase {
|
||||
|
||||
private void setupDataSource(String url, String database, String username, String password) {
|
||||
HikariConfig config = new HikariConfig();
|
||||
config.setDriverClassName(org.postgresql.Driver.class.getName()); // load shaded driver via plugin classloader; DriverManager can't see it
|
||||
config.setJdbcUrl("jdbc:postgresql://" + url + "/" + database);
|
||||
config.setUsername(username);
|
||||
config.setPassword(password);
|
||||
|
||||
Reference in new issue
Block a user