From b43cf9ac333787e50e666a79ed14e06062cf270a Mon Sep 17 00:00:00 2001
From: Jacob Swehla <30414349+JacobSwehla@users.noreply.github.com>
Date: Fri, 29 Dec 2017 11:25:31 -0600
Subject: [PATCH] Moved config file and fixed some warnings
---
Server/pom.xml | 49 +++++++++++++------
.../simon987/server/ServerConfiguration.java | 2 +-
pom.xml | 14 ++----
3 files changed, 38 insertions(+), 27 deletions(-)
diff --git a/Server/pom.xml b/Server/pom.xml
index a1c3a52..df94ffc 100644
--- a/Server/pom.xml
+++ b/Server/pom.xml
@@ -3,24 +3,37 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
-
- net.simon987.server
- server_root
- 1.2a
-
+
-
-
- ../Server/src/main/resources
- true
-
- config.properties
-
-
-
+
+
+ maven-resources-plugin
+ 3.0.2
+
+
+ default-resources
+
+ prepare-package
+
+ resources
+
+
+ ../target/
+
+
+ ../Server/src/main/resources
+ true
+
+ config.properties
+
+
+
+
+
+
+
3.6.2
org.apache.maven.plugins
@@ -50,6 +63,7 @@
org.apache.maven.plugins
maven-jar-plugin
+ 3.0.2
../target
@@ -93,4 +107,9 @@
+
+
+ UTF-8
+
+
\ No newline at end of file
diff --git a/Server/src/main/java/net/simon987/server/ServerConfiguration.java b/Server/src/main/java/net/simon987/server/ServerConfiguration.java
index 3338c90..b5d2f8a 100644
--- a/Server/src/main/java/net/simon987/server/ServerConfiguration.java
+++ b/Server/src/main/java/net/simon987/server/ServerConfiguration.java
@@ -22,7 +22,7 @@ public class ServerConfiguration {
public ServerConfiguration(String file) {
try {
properties = new Properties();
- InputStream is = ServerConfiguration.class.getClassLoader().getResourceAsStream("config.properties");
+ InputStream is = new FileInputStream("config.properties");
properties.load(is);
} catch (IOException e) {
diff --git a/pom.xml b/pom.xml
index 38a43c2..91054b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,26 +13,18 @@
- 3.6.2
org.apache.maven.plugins
+ 3.6.2
maven-compiler-plugin
1.8
1.8
-
- 3.6.2
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.8
- 1.8
-
-
-
+
org.apache.maven.plugins
maven-jar-plugin
+ 3.0.2
../target/plugins