diff --git a/QTM b/QTM
index 4c6a76ab..2dd50fe1 100755
--- a/QTM
+++ b/QTM
@@ -1,3 +1,3 @@
#!/bin/bash
-java -Xmx512m -jar target/QTM-1.0-SNAPSHOT.jar $*
+java -Xmx512m -jar target/QTM-1.0.jar $*
diff --git a/pom.xml b/pom.xml
index e30451be..bac1a282 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.wur
QTM
- 1.0-SNAPSHOT
+ 1.0
@@ -62,6 +62,12 @@
1.4_rc3
+
+ org.apache.maven
+ maven-model
+ 3.3.9
+
+
org.xerial
sqlite-jdbc
diff --git a/src/main/java/qtm/QtmMain.java b/src/main/java/qtm/QtmMain.java
index 994e65f3..6eeb75d7 100644
--- a/src/main/java/qtm/QtmMain.java
+++ b/src/main/java/qtm/QtmMain.java
@@ -14,9 +14,9 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
-
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.apache.commons.io.FilenameUtils;
-
import readers.PmcMetaReader;
import resultDb.QtlDb;
import utils.Configs;
@@ -39,7 +39,14 @@ public static void main(String[] args) throws IOException {
if (Arrays.asList(args).contains("-v")
| Arrays.asList(args).contains("--version")) {
- System.out.println("1.0 ");
+ try{
+ MavenXpp3Reader reader = new MavenXpp3Reader();
+ Model model = reader.read(new FileReader("pom.xml"));
+ System.out.println(model.getVersion());
+ }
+ catch(Exception e){
+ e.printStackTrace();
+ }
return;
}
@@ -52,10 +59,10 @@ public static void main(String[] args) throws IOException {
+ ".db";
}
}
-
+
// (re)start Solr server
controlSolr("restart");
-
+
String inputFile = args[0];
ArrayList pmcIds = new ArrayList();
BufferedReader reader = null;
@@ -196,7 +203,7 @@ public static long bytesToMegabytes(long bytes) {
public static void controlSolr(String cmd) {
System.out.println("Solr server has been " + cmd + "ed.");
- System.out.println("--------------------------------------------");
+ System.out.println("--------------------------------------------");
try {
String[] cmdline = {Configs.getPropertyQTM("solrRun"), cmd,
Configs.getPropertyQTM("solrPort"),
@@ -209,7 +216,7 @@ public static void controlSolr(String cmd) {
}
System.out.println("\n");
}
-
+
public static void printHelp() {
System.out.println("\nDESCRIPTION");
System.out.println("===========");