Permalink
Browse files

Get version from PomInfo

  • Loading branch information...
1 parent 7416955 commit 792a9cb4152a719da418536db64e99b8508b9faf @trixon committed Jan 21, 2017
View
@@ -47,7 +47,7 @@
<dependency>
<groupId>se.trixon.almond</groupId>
<artifactId>almond-util</artifactId>
- <version>1.1.9</version>
+ <version>1.1.10-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
@@ -111,7 +111,6 @@
<includes>
<include>se/trixon/almond/util/*</include>
<include>se/trixon/almond/util/swing/**</include>
- <include>se/trixon/almond/util/icon/*</include>
<include>se/trixon/almond/util/icons/*</include>
<include>se/trixon/almond/util/icons/material/*</include>
<include>se/trixon/almond/util/icons/material/_action/*.png</include>
@@ -26,6 +26,7 @@
import org.apache.commons.cli.ParseException;
import se.trixon.almond.util.BundleHelper;
import se.trixon.almond.util.Dict;
+import se.trixon.almond.util.PomInfo;
import se.trixon.almond.util.SystemHelper;
import se.trixon.almond.util.Xlog;
import se.trixon.jota.shared.Jota;
@@ -84,7 +85,8 @@ private static void displayHelp(Options options) {
}
private static void displayVersion() {
- System.out.println(String.format(sBundle.getString("version_info"), SystemHelper.getJarVersion(Main.class)));
+ PomInfo pomInfo = new PomInfo(Main.class, "se.trixon", "jotasync");
+ System.out.println(String.format(sBundle.getString("version_info"), pomInfo.getVersion()));
}
private static Options initOptions() {
@@ -54,6 +54,7 @@
import se.trixon.almond.util.AlmondUI;
import se.trixon.almond.util.BundleHelper;
import se.trixon.almond.util.Dict;
+import se.trixon.almond.util.PomInfo;
import se.trixon.almond.util.SystemHelper;
import se.trixon.almond.util.icons.material.MaterialIcon;
import se.trixon.almond.util.swing.SwingHelper;
@@ -648,7 +649,8 @@ public void actionPerformed(ActionEvent e) {
@Override
public void actionPerformed(ActionEvent e) {
- String versionInfo = String.format(Jota.getBundle().getString("version_info"), SystemHelper.getJarVersion(Main.class));
+ PomInfo pomInfo = new PomInfo(Main.class, "se.trixon", "jotasync");
+ String versionInfo = String.format(Jota.getBundle().getString("version_info"), pomInfo.getVersion());
Message.information(MainFrame.this, Dict.ABOUT.toString(), versionInfo);
}
};
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2016 Patrik Karlsson.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,11 +25,12 @@
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
-import se.trixon.jota.shared.Jota;
import se.trixon.almond.util.BundleHelper;
+import se.trixon.almond.util.Dict;
+import se.trixon.almond.util.PomInfo;
import se.trixon.almond.util.SystemHelper;
import se.trixon.almond.util.Xlog;
-import se.trixon.almond.util.Dict;
+import se.trixon.jota.shared.Jota;
/**
*
@@ -72,7 +73,8 @@ private static void displayHelp(Options options) {
}
private static void displayVersion() {
- System.out.println(String.format(sBundle.getString("version_info"), SystemHelper.getJarVersion(Main.class)));
+ PomInfo pomInfo = new PomInfo(se.trixon.jota.client.Main.class, "se.trixon", "jotasync");
+ System.out.println(String.format(sBundle.getString("version_info"), pomInfo.getVersion()));
}
private static Options initOptions() {

0 comments on commit 792a9cb

Please sign in to comment.