gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
moved version.properties to a class subfolder to prevent conflicts
authorDoni Pracner <quinnuendo@gmail.com>
Wed, 20 Apr 2016 16:05:58 +0000 (18:05 +0200)
committerDoni Pracner <quinnuendo@gmail.com>
Wed, 20 Apr 2016 16:05:58 +0000 (18:05 +0200)
updated the version name loader, removed error displays since they
are irrelevant.

updates to the ant build to reflect the new name.

build.xml
res/com/quemaster/transformations/mjc2wsl/version.properties [new file with mode: 0644]
res/version.properties [deleted file]
src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java

index fc76dd0157d104141b92a340944af7b1ff1f8e20..2f6f5805b3460020c0dbee507e110d9e2d514260 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -64,7 +64,7 @@
     <property name="log.file.tests.m" value="${log.dir}/tests-mj" />
     <property name="log.file.tests.t" value="${log.dir}/tests-wsl" />
 
-    <property name="version.file" value="${res.dir}/version.properties" />
+    <property name="version.file" value="${res.dir}/com/quemaster/transformations/mjc2wsl/version.properties" />
 
     <!-- **************************************** -->
     <!-- patterns -->
     <target name="-store-version-string" if="version">
             <!-- store the new  version string in the correct property file -->
             <echo message="version=${version}"/>
+            <dirname file="${version.file}" property="version.file.dir"/>
+            <mkdir dir="${version.file.dir}" />
             <propertyfile file="${version.file}">
                     <entry key="version" value="${version}"/>
             </propertyfile>
diff --git a/res/com/quemaster/transformations/mjc2wsl/version.properties b/res/com/quemaster/transformations/mjc2wsl/version.properties
new file mode 100644 (file)
index 0000000..c1a7627
--- /dev/null
@@ -0,0 +1,2 @@
+#Mon, 18 Aug 2014 20:45:53 +0200
+version=v0.2.0
diff --git a/res/version.properties b/res/version.properties
deleted file mode 100644 (file)
index c1a7627..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#Mon, 18 Aug 2014 20:45:53 +0200
-version=v0.2.0
index 2ba758b745bb7183a1a04445587d69374de55596..ce8210100ac32cef3af64fbcca5a66094af1e1c3 100644 (file)
@@ -42,7 +42,7 @@ public class mjc2wsl{
        //default version name, used if the file is not found
        private static String versionN = "v0.2.x";
 
-       private String versionFile = "/version.properties";
+       private String versionFile = "version.properties";
        
        private TransMessages messages = new TransMessages();
 
@@ -137,8 +137,9 @@ public class mjc2wsl{
                        versionData = new Properties();
                        try {
                                versionData.load(getClass().getResourceAsStream(versionFile));
-                       } catch (IOException e) {
-                               e.printStackTrace();
+                       } catch (IOException | NullPointerException e) {
+                               // it doesn't matter
+                               //e.printStackTrace();
                        }
                }
                String ver = versionData.getProperty("version");
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner