diff --git a/build.gradle b/build.gradle index 893ca6b..0ba5c9d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ subprojects { group = 'io.opencaesar.owl' - version = '1.1.2' + version = '1.1.3' ext.versions = [ owl: '5.1.17', diff --git a/owl-fuseki/src/main/java/io/opencaesar/owl/fuseki/FusekiApp.java b/owl-fuseki/src/main/java/io/opencaesar/owl/fuseki/FusekiApp.java index 86e04d8..6fee3e1 100644 --- a/owl-fuseki/src/main/java/io/opencaesar/owl/fuseki/FusekiApp.java +++ b/owl-fuseki/src/main/java/io/opencaesar/owl/fuseki/FusekiApp.java @@ -1,9 +1,23 @@ package io.opencaesar.owl.fuseki; -import java.io.*; -import java.net.*; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; +import java.net.URISyntaxException; +import java.net.URL; import java.nio.file.Path; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Optional; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -13,19 +27,15 @@ import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; - -import com.beust.jcommander.IStringConverter; -import com.beust.jcommander.JCommander; -import com.beust.jcommander.Parameter; -import com.beust.jcommander.ParameterException; - import org.apache.maven.repository.internal.MavenRepositorySystemUtils; import org.apache.maven.resolver.owl.fuseki.ManualRepositorySystemFactory; import org.eclipse.aether.DefaultRepositorySystemSession; import org.eclipse.aether.RepositorySystem; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; -import org.eclipse.aether.collection.*; +import org.eclipse.aether.collection.CollectRequest; +import org.eclipse.aether.collection.CollectResult; +import org.eclipse.aether.collection.DependencyCollectionException; import org.eclipse.aether.graph.Dependency; import org.eclipse.aether.graph.DependencyNode; import org.eclipse.aether.graph.DependencyVisitor; @@ -35,6 +45,11 @@ import org.eclipse.aether.resolution.ArtifactResolutionException; import org.eclipse.aether.resolution.ArtifactResult; +import com.beust.jcommander.IStringConverter; +import com.beust.jcommander.JCommander; +import com.beust.jcommander.Parameter; +import com.beust.jcommander.ParameterException; + /** * Start an Apache Fuseki server, either in headless mode or with a web UI. * This application resolves the Apache Fuseki dependencies from a remote maven repository @@ -305,11 +320,11 @@ public static void startFuseki( if (pingArg) { args[pos++] = "--ping"; } - args[pos++] = "--config=" + config.getName(); // put the simple file name to avoid spaces in path + args[pos++] = "--config=" + output.relativize(config.toPath()); // put the relative path to avoid spaces in path System.arraycopy(argv, 0, args, pos, argv.length); ProcessBuilder pb = new ProcessBuilder(args); - pb.directory(config.getParentFile()); // run in the config file's folder + pb.directory(output.toFile()); pb.redirectErrorStream(true); pb.redirectOutput(logFile);