Skip to content

Commit

Permalink
fix: JiveGlobals API Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Aug 22, 2024
1 parent d51af3f commit 0b19883
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import org.jivesoftware.util.JiveGlobals;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;

public class Main {
Expand All @@ -44,8 +46,8 @@ public static void main(String[] args) {
String parent = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent();
PropertiesReader reader = new PropertiesReader(parent + "/maven-archiver/pom.properties");

String distributionDir = new File(parent).toPath().resolve("../../../../distribution/target/distribution-base").toFile().getCanonicalPath();
JiveGlobals.setHomeDirectory(distributionDir);
Path distributionPath = Paths.get(parent).resolve("../../../../distribution/target/distribution-base").toAbsolutePath();
JiveGlobals.setHomePath(distributionPath);

JiveGlobals.setXMLProperty("connectionProvider.className", "org.jivesoftware.database.DefaultConnectionProvider");
JiveGlobals.setXMLProperty("database.defaultProvider.driver", connectionDriver);
Expand Down

0 comments on commit 0b19883

Please sign in to comment.