You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/03/22 11:40:10 UTC

svn commit: r1580188 - in /jena/branches/jena-fuseki-new-ui: fuseki fuseki-server fuseki_d.sh make_cp_mvn run-fuseki run_cp

Author: andy
Date: Sat Mar 22 10:40:10 2014
New Revision: 1580188

URL: http://svn.apache.org/r1580188
Log:
Dev run improvements

Added:
    jena/branches/jena-fuseki-new-ui/fuseki
      - copied, changed from r1579960, jena/branches/jena-fuseki-new-ui/fuseki_d.sh
Removed:
    jena/branches/jena-fuseki-new-ui/fuseki_d.sh
    jena/branches/jena-fuseki-new-ui/run_cp
Modified:
    jena/branches/jena-fuseki-new-ui/fuseki-server
    jena/branches/jena-fuseki-new-ui/make_cp_mvn
    jena/branches/jena-fuseki-new-ui/run-fuseki

Copied: jena/branches/jena-fuseki-new-ui/fuseki (from r1579960, jena/branches/jena-fuseki-new-ui/fuseki_d.sh)
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/fuseki?p2=jena/branches/jena-fuseki-new-ui/fuseki&p1=jena/branches/jena-fuseki-new-ui/fuseki_d.sh&r1=1579960&r2=1580188&rev=1580188&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/fuseki_d.sh (original)
+++ jena/branches/jena-fuseki-new-ui/fuseki Sat Mar 22 10:40:10 2014
@@ -33,6 +33,9 @@
 # FUSEKI_HOME
 #   Where Fuseki is installed.  If not set, the script will try
 #   to guess it based on the script invokation path.
+# 
+# FUSEKI_BASE
+#   The root of the runtime area - logs files, system files, local configuration.
 #
 # FUSEKI_RUN
 #   Where the fuseki.pid file should be stored.  It defaults
@@ -52,10 +55,13 @@
 # FUSEKI_USER
 #   If set, the server will be run as this user
 #
+# ** v1 comaptibility
 # FUSEKI_DATA_DIR
 #   The location of the data directory Fuseki will use (i.e. the value of --loc).
+#   This is not the same as the databases/ area.
 #   Defaults to $FUSEKI_HOME/DB
 #
+# ** v1 comaptibility
 # FUSEKI_LOGS
 #   Directory where logs will be generated. Defaults to $FUSEKI_HOME/log
 #
@@ -100,7 +106,7 @@ fi
 
 usage()
 {
-  echo "Usage: ${0##*/} {start|stop|restart|status}"
+  echo "Usage: ${0##*/} {start|stop|restart|run|status}"
   exit 1
 }
 
@@ -191,7 +197,7 @@ fi
 # Log directory
 if [ -z "$FUSEKI_LOGS" ]
 then
-  FUSEKI_LOGS="$FUSEKI_HOME/log"
+  FUSEKI_LOGS="$FUSEKI_BASE/logs"
 fi
 
 # Std Err and Out log
@@ -213,7 +219,7 @@ then
 fi
 if [ -z "$JAVA" ]
 then
-  echo "Cannot find a Java JDK. Please set either set JAVA or put java (>=1.6) in your PATH." 2>&2
+  echo "Cannot find a Java JDK. Please set either set JAVA or put java (>=1.7) in your PATH." 2>&2
   exit 1
 fi
 
@@ -400,6 +406,17 @@ stop() {
   fi
 }
 
+
+# Run in the foreground, as the current user
+run() {
+  # Make sure the .jar file exists
+  if [ ! -e $FUSEKI_START ]; then
+    log_daemon_msg "Could not see Fuseki .jar file: \$FUSEKI_START has value '$FUSEKI_START'"
+    exit 1
+  fi
+  exec "${RUN_CMD[@]}"
+}
+
 case $1 in
   start)
     start
@@ -411,6 +428,9 @@ case $1 in
     stop "restarting"
     start
   ;;
+  run)
+    run
+  ;;
   status)
     FUSEKI_PID=$(findFile fuseki.pid /var/run /usr/var/run $FUSEKI_HOME /tmp)
     if running $FUSEKI_PID

Modified: jena/branches/jena-fuseki-new-ui/fuseki-server
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/fuseki-server?rev=1580188&r1=1580187&r2=1580188&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/fuseki-server (original)
+++ jena/branches/jena-fuseki-new-ui/fuseki-server Sat Mar 22 10:40:10 2014
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -16,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Run fuseki as a standalone server
+
 export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
 
 if [ ! -e "$FUSEKI_HOME" ]

Modified: jena/branches/jena-fuseki-new-ui/make_cp_mvn
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/make_cp_mvn?rev=1580188&r1=1580187&r2=1580188&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/make_cp_mvn (original)
+++ jena/branches/jena-fuseki-new-ui/make_cp_mvn Sat Mar 22 10:40:10 2014
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # Make the maven classpath
 
 $POM="pom.xml" ;
@@ -14,7 +14,7 @@ print "#!/bin/bash\n" ;
 print "\n" ;
 print 'XCP="' ;
 
-open(X, "mvn -f $POM dependency:build-classpath |") ;
+open(X, "mvn -f $POM dependency:build-classpath -DincludeScope=runtime |") ;
 while(<X>)
 {
     next if /\[INFO\]/ ;

Modified: jena/branches/jena-fuseki-new-ui/run-fuseki
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/run-fuseki?rev=1580188&r1=1580187&r2=1580188&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/run-fuseki (original)
+++ jena/branches/jena-fuseki-new-ui/run-fuseki Sat Mar 22 10:40:10 2014
@@ -34,17 +34,17 @@ function check_dir() {
     fi
 }
 
-export FUSEKI_HOME=$PWD
+export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
 check_dir "FUSEKI_HOME" "$FUSEKI_HOME"
 
-export FUSEKI_BASE="$FUSEKI_HOME/run"
+export FUSEKI_BASE="${FUSEKI_BASE:-$FUSEKI_HOME/run}"
 check_dir "FUSEKI_BASE" "$FUSEKI_BASE"
 
-CPF="$FUSEKI_HOME/fuseki.classpath"
+CPF="$PWD/fuseki.classpath"
 
 if [ ! -e "$CPF" ]; then
     echo "Creating Fuseki classpath file"
-    exec "$FUSEKI_HOME/make_cp_bin" > $CPF
+    "$PWD/make_cp_mvn" > $CPF
 fi
 
 CP="$(. $CPF)"