Repository: incubator-systemml
Updated Branches:
  refs/heads/master 168ff41ec -> ecadf0fe8


[SYSTEMML-1600] Display version in MLContext welcome message

Closes #502.


Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/ecadf0fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/ecadf0fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/ecadf0fe

Branch: refs/heads/master
Commit: ecadf0fe8d1ae88b7b79c9fee99d6a58a847be77
Parents: 168ff41
Author: krishnakalyan3 <krishnakaly...@gmail.com>
Authored: Tue May 16 10:59:11 2017 -0700
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Tue May 16 10:59:11 2017 -0700

----------------------------------------------------------------------
 .../org/apache/sysml/api/mlcontext/MLContextUtil.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/ecadf0fe/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java 
b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
index c4314bf..d5b48bc 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
@@ -974,8 +974,16 @@ public final class MLContextUtil {
         * @return the SystemML welcome message
         */
        public static String welcomeMessage() {
-               StringBuilder sb = new StringBuilder();
-               sb.append("\nWelcome to Apache SystemML!\n");
+        StringBuilder sb = new StringBuilder();
+        sb.append("\nWelcome to Apache SystemML!\n");
+        try {
+            ProjectInfo info = ProjectInfo.getProjectInfo();
+            if (info.version() != null) {
+               sb.append("Version ");
+                sb.append(info.version());
+            }
+        } catch (MLContextException e) {
+        }
                return sb.toString();
        }
 

Reply via email to