manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1556798 - in /manifoldcf/trunk: CHANGES.txt framework/example-multiprocess-common/start-webapps.bat framework/example-multiprocess-common/start-webapps.sh
Date Thu, 09 Jan 2014 13:09:17 GMT
Author: kwright
Date: Thu Jan  9 13:09:17 2014
New Revision: 1556798

URL: http://svn.apache.org/r1556798
Log:
Fix for CONNECTORS-855.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.bat
    manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.sh

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1556798&r1=1556797&r2=1556798&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Jan  9 13:09:17 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.5-dev =====================
 
+CONNECTORS-855: Use -D switch in start-webapps scripts to point
+to the right properties.xml file.  Otherwise who knows where the
+properties may come from.
+
 CONNECTORS-851: Add mail.jar to connector wsdl builder to turn off
 warnings.  Also provide ability to extend build with optional include.
 (B. Scott Michel, Karl Wright)

Modified: manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.bat
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.bat?rev=1556798&r1=1556797&r2=1556798&view=diff
==============================================================================
--- manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.bat (original)
+++ manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.bat Thu Jan  9 13:09:17
2014
@@ -16,13 +16,18 @@ rem limitations under the License.
 
 rem check that JAVA_HOME is set, and that the current directory is correct
 if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome
-
+if not exist ".\properties.xml" goto nolcfhome
+rem set MCF_HOME
+set MCF_HOME=%CD%
 set CLASSPATH=.
 for %%f in (lib/*) do call setclasspath.bat %%f
 rem invoke java with the jetty class
-"%JAVA_HOME%\bin\java" -cp "%CLASSPATH%" org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner
+"%JAVA_HOME%\bin\java" -cp "%CLASSPATH%" "-Dorg.apache.manifoldcf.configfile=%MCF_HOME%\properties.xml"
org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner
 goto done
 :nojavahome
 echo Environment variable JAVA_HOME is not set properly.
 goto done
+:nolcfhome
+echo Current working directory does not contain a properties.xml file.
+goto done
 :done

Modified: manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.sh
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.sh?rev=1556798&r1=1556797&r2=1556798&view=diff
==============================================================================
--- manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.sh (original)
+++ manifoldcf/trunk/framework/example-multiprocess-common/start-webapps.sh Thu Jan  9 13:09:17
2014
@@ -23,19 +23,26 @@ fi
 
 #Make sure environment variables are properly set
 if [ -e "$JAVA_HOME"/bin/java ] ; then
-
-    CLASSPATH=""
-    for filename in $(ls -1 ./lib) ; do
-        if [ -n "$CLASSPATH" ] ; then
-            CLASSPATH="$CLASSPATH""$PATHSEP"./lib/"$filename"
-        else
-            CLASSPATH=./lib/"$filename"
-        fi
-    done
-
-    "$JAVA_HOME"/bin/java -cp "$CLASSPATH" org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner
-    exit $?
+    if [ -f ./properties.xml ] ; then
+        # Set the MCF_HOME variable
+        export MCF_HOME=$PWD
+        CLASSPATH=""
+        for filename in $(ls -1 ./lib) ; do
+            if [ -n "$CLASSPATH" ] ; then
+                CLASSPATH="$CLASSPATH""$PATHSEP"./lib/"$filename"
+            else
+                CLASSPATH=./lib/"$filename"
+            fi
+        done
+        DEFINES="-Dorg.apache.manifoldcf.configfile=$MCF_HOME/properties.xml"
+        "$JAVA_HOME"/bin/java -cp "$CLASSPATH" $DEFINES org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner
+        exit $?
         
+    else
+        echo "Working directory contains no properties.xml file." 1>&2
+        exit 1
+    fi
+
 else
     echo "Environment variable JAVA_HOME is not properly set." 1>&2
     exit 1



Mime
View raw message