Author: kwright
Date: Mon Sep 29 12:23:09 2014
New Revision: 1628168
URL: http://svn.apache.org/r1628168
Log:
Added start.bat and start.sh; part of CONNECTORS-345
Added:
manifoldcf/trunk/framework/scripts-start/
manifoldcf/trunk/framework/scripts-start/start-options.env.unix (with
props)
manifoldcf/trunk/framework/scripts-start/start-options.env.win (with
props)
manifoldcf/trunk/framework/scripts-start/start.bat (with props)
manifoldcf/trunk/framework/scripts-start/start.sh (with props)
Modified:
manifoldcf/trunk/framework/build.xml
Modified: manifoldcf/trunk/framework/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/build.xml?rev=1628168&r1=1628167&r2=1628168&view=diff
==============================================================================
--- manifoldcf/trunk/framework/build.xml (original)
+++ manifoldcf/trunk/framework/build.xml Mon Sep 29 12:23:09 2014
@@ -958,6 +958,10 @@
<replace file="${processes-dir}/combined-options.env.unix" token=".:"
value=".:${unix-classpath}:"/>
</target>
+ <target name="general-set-start-classpath">
+ <replace file="${processes-dir}/start-options.env.win" token=".;"
value=".;${win-classpath};"/>
+ <replace file="${processes-dir}/start-options.env.unix" token=".:"
value=".:${unix-classpath}:"/>
+ </target>
<target name="preclean-processes">
<mkdir dir="${processes-dir}"/>
@@ -995,6 +999,12 @@
<delete file="${processes-dir}/combined-options.env.unix"/>
</target>
+ <target name="preclean-start-processes">
+ <mkdir dir="${processes-dir}"/>
+ <delete file="${processes-dir}/start-options.env.win"/>
+ <delete file="${processes-dir}/start-options.env.unix"/>
+ </target>
+
<target name="scripts-common">
<mkdir dir="${processes-dir}"/>
<copy todir="${processes-dir}">
@@ -1037,6 +1047,13 @@
</copy>
</target>
+ <target name="scripts-start" depends="scripts-common">
+ <mkdir dir="${processes-dir}"/>
+ <copy todir="${processes-dir}">
+ <fileset dir="scripts-start"/>
+ </copy>
+ </target>
+
<target name="scripts-engine" depends="scripts-common">
<mkdir dir="${processes-dir}"/>
<copy todir="${processes-dir}">
@@ -1279,6 +1296,14 @@
</antcall>
</target>
+ <target name="setup-start-processes"
depends="preclean-start-processes,scripts-start,process-lib-classpath,database-lib-classpath,jetty-lib-classpath">
+ <antcall target="general-set-start-classpath">
+ <param name="processes-dir" value="${processes-dir}"/>
+ <param name="win-classpath"
value="..\lib\mcf-core.jar;..\lib\mcf-agents.jar;..\lib\mcf-pull-agent.jar;..\lib\mcf-ui-core.jar;..\lib\mcf-jetty-runner.jar;${jetty-lib-classpath-win};${database-lib-classpath-win};${process-lib-classpath-win}"/>
+ <param name="unix-classpath"
value="../lib/mcf-core.jar:../lib/mcf-agents.jar:../lib/mcf-pull-agent.jar:../lib/mcf-ui-core.jar:../lib/mcf-jetty-runner.jar:${jetty-lib-classpath-unix}:${database-lib-classpath-unix}:${process-lib-classpath-unix}"/>
+ </antcall>
+ </target>
+
<target name="setup-processes"
depends="preclean-processes,scripts,process-lib-classpath,database-lib-classpath">
<antcall target="general-set-classpath">
<param name="processes-dir" value="${processes-dir}"/>
@@ -1299,6 +1324,14 @@
<target name="setup-combined-processes-proprietary"
depends="setup-combined-processes">
</target>
+ <target name="setup-start-processes-proprietary"
depends="preclean-start-processes,scripts-start,process-lib-classpath,process-lib-proprietary-classpath,database-lib-classpath,jetty-lib-classpath">
+ <antcall target="general-set-start-classpath">
+ <param name="processes-dir" value="${processes-dir}"/>
+ <param name="win-classpath"
value="..\lib\mcf-core.jar;..\lib\mcf-agents.jar;..\lib\mcf-pull-agent.jar;..\lib\mcf-ui-core.jar;..\lib\mcf-jetty-runner.jar;${jetty-lib-classpath-win};${database-lib-classpath-win};${process-lib-proprietary-classpath-win};${process-lib-classpath-win}"/>
+ <param name="unix-classpath"
value="../lib/mcf-core.jar:../lib/mcf-agents.jar:../lib/mcf-pull-agent.jar:../lib/mcf-ui-core.jar:../lib/mcf-jetty-runner.jar:${jetty-lib-classpath-unix}:${database-lib-classpath-unix}:${process-lib-proprietary-classpath-unix}:${process-lib-classpath-unix}"/>
+ </antcall>
+ </target>
+
<target name="setup-processes-proprietary"
depends="preclean-processes,scripts,process-lib-classpath,database-lib-classpath,process-lib-proprietary-classpath">
<antcall target="general-set-classpath">
<param name="processes-dir" value="${processes-dir}"/>
@@ -1484,6 +1517,9 @@
<antcall target="setup-combined-processes">
<param name="processes-dir" value="dist/example"/>
</antcall>
+ <antcall target="setup-start-processes">
+ <param name="processes-dir" value="dist/example"/>
+ </antcall>
<mkdir dir="dist/example/logs"/>
<copy todir="dist/example">
<fileset dir="example-singleprocess-common">
@@ -1513,6 +1549,9 @@
<antcall target="setup-combined-processes-proprietary">
<param name="processes-dir" value="dist/example-proprietary"/>
</antcall>
+ <antcall target="setup-start-processes-proprietary">
+ <param name="processes-dir" value="dist/example-proprietary"/>
+ </antcall>
<mkdir dir="dist/example-proprietary/logs"/>
<copy todir="dist/example-proprietary">
<fileset dir="example-singleprocess-common">
Added: manifoldcf/trunk/framework/scripts-start/start-options.env.unix
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/scripts-start/start-options.env.unix?rev=1628168&view=auto
==============================================================================
--- manifoldcf/trunk/framework/scripts-start/start-options.env.unix (added)
+++ manifoldcf/trunk/framework/scripts-start/start-options.env.unix Mon Sep 29
12:23:09 2014
@@ -0,0 +1,5 @@
+-Xms256m
+-Xmx256m
+-Dorg.apache.manifoldcf.configfile=./properties.xml
+-cp
+.:
Propchange: manifoldcf/trunk/framework/scripts-start/start-options.env.unix
------------------------------------------------------------------------------
svn:eol-style = LF
Added: manifoldcf/trunk/framework/scripts-start/start-options.env.win
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/scripts-start/start-options.env.win?rev=1628168&view=auto
==============================================================================
--- manifoldcf/trunk/framework/scripts-start/start-options.env.win (added)
+++ manifoldcf/trunk/framework/scripts-start/start-options.env.win Mon Sep 29
12:23:09 2014
@@ -0,0 +1,5 @@
+-Xms256m
+-Xmx256m
+-Dorg.apache.manifoldcf.configfile=.\properties.xml
+-cp
+.;
Propchange: manifoldcf/trunk/framework/scripts-start/start-options.env.win
------------------------------------------------------------------------------
svn:eol-style = CRLF
Added: manifoldcf/trunk/framework/scripts-start/start.bat
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/scripts-start/start.bat?rev=1628168&view=auto
==============================================================================
--- manifoldcf/trunk/framework/scripts-start/start.bat (added)
+++ manifoldcf/trunk/framework/scripts-start/start.bat Mon Sep 29 12:23:09 2014
@@ -0,0 +1,31 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+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
+set JAVAOPTIONS=
+for /f "delims=" %%a in ('type start-options.env.win') do call
setjavaoption.bat "%%a"
+rem invoke java with the jetty class
+"%JAVA_HOME%\bin\java" %JAVAOPTIONS%
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
Propchange: manifoldcf/trunk/framework/scripts-start/start.bat
------------------------------------------------------------------------------
svn:eol-style = CRLF
Added: manifoldcf/trunk/framework/scripts-start/start.sh
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/scripts-start/start.sh?rev=1628168&view=auto
==============================================================================
--- manifoldcf/trunk/framework/scripts-start/start.sh (added)
+++ manifoldcf/trunk/framework/scripts-start/start.sh Mon Sep 29 12:23:09 2014
@@ -0,0 +1,41 @@
+#!/bin/bash -e
+
+# 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 regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [[ $OSTYPE == "cygwin" ]] ; then
+ OPTIONSFILE="start-options.env.win"
+else
+ OPTIONSFILE="start-options.env.unix"
+fi
+
+#Make sure environment variables are properly set
+if [ -e "$JAVA_HOME"/bin/java ] ; then
+ if [ -f ./properties.xml ] ; then
+ # Build the global options
+ OPTIONS=$(cat "$OPTIONSFILE")
+
+ "$JAVA_HOME/bin/java" $OPTIONS
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
+fi
Propchange: manifoldcf/trunk/framework/scripts-start/start.sh
------------------------------------------------------------------------------
svn:eol-style = LF