Few changes to CORD GUI for integration:

 * Make listen port configurable
 * Portability fix so stop.me works on ubuntu
 * Force compiling with Java 1.8

Change-Id: I997da28194613631ee287a8679880b313d51addd
diff --git a/apps/demo/cord-gui/pom.xml b/apps/demo/cord-gui/pom.xml
index e7a9212..e109d60 100644
--- a/apps/demo/cord-gui/pom.xml
+++ b/apps/demo/cord-gui/pom.xml
@@ -88,4 +88,22 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <!-- TODO: update once following issue is fixed. -->
+                    <!-- https://jira.codehaus.org/browse/MCOMPILER-205 -->
+                    <version>2.5.1</version>
+                    <configuration>
+                        <source>1.8</source>
+                        <target>1.8</target>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
 </project>
diff --git a/apps/demo/cord-gui/src/scripts/run.me b/apps/demo/cord-gui/src/scripts/run.me
index 85bf294..4fc7574 100644
--- a/apps/demo/cord-gui/src/scripts/run.me
+++ b/apps/demo/cord-gui/src/scripts/run.me
@@ -2,6 +2,7 @@
 # CORD Demo
 # =========
 
+export LISTENPORT=8080
 export JETTY="-jar jetty-runner.jar"
 export CORD=./cord-gui-1.2.0-SNAPSHOT.war
 export LOGDBG=-Dorg.onosproject.cord.gui.LEVEL=DEBUG
@@ -25,8 +26,8 @@
   PARAM2=""
 fi
 
-java $PARAM1 $PARAM2 $LOGDBG $JETTY $CORD >$LOG 2>&1 &
-#java $PARAM1 $PARAM2 $LOGDBG $DEBUG $JETTY $CORD >$LOG 2>&1 &
+java $PARAM1 $PARAM2 $LOGDBG $JETTY --port $LISTENPORT $CORD >$LOG 2>&1 &
+#java $PARAM1 $PARAM2 $LOGDBG $DEBUG $JETTY --port $LISTENPORT $CORD >$LOG 2>&1 &
 
 echo jetty-runner started {$PARAM1:$PARAM2}
 echo .. logging to $LOG
diff --git a/apps/demo/cord-gui/src/scripts/stop.me b/apps/demo/cord-gui/src/scripts/stop.me
index 331d9bb..3e34aa7 100644
--- a/apps/demo/cord-gui/src/scripts/stop.me
+++ b/apps/demo/cord-gui/src/scripts/stop.me
@@ -1,6 +1,6 @@
 # script to stop the cord gui server
 #
-PID=$(ps | grep jetty-runner | grep -v grep | cut -c1-5)
+PID=$(ps -ef | grep jetty-runner | grep -v grep | awk '{print $2}')
 if [ -z "$PID" ]
 then
   echo jetty-runner not running
@@ -9,7 +9,7 @@
 kill $PID
 sleep 1
 
-PID=$(ps | grep jetty-runner | grep -v grep | cut -c1-5)
+PID=$(ps -ef | grep jetty-runner | grep -v grep | awk '{print $2}')
 if [ ! -z "$PID" ]
 then
   echo jetty-runner still running ?