You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2009/12/07 17:58:17 UTC
svn commit: r888000 - in
/incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts: dd2spring.bat
dd2spring.sh
Author: schor
Date: Mon Dec 7 16:58:16 2009
New Revision: 888000
URL: http://svn.apache.org/viewvc?rev=888000&view=rev
Log:
UIMA-1701 change dd2spring scripts to use jar runner, and fix also to allow use of blanks in file paths. Also add "usage" statement
Modified:
incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.bat
incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.sh
Modified: incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.bat
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.bat?rev=888000&r1=887999&r2=888000&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.bat (original)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.bat Mon Dec 7 16:58:16 2009
@@ -19,15 +19,21 @@
@setlocal
if not defined UIMA_HOME goto USAGE_UIMA
+if "%1" == "" goto usage
goto RUN
:USAGE_UIMA
echo UIMA_HOME environment variable is not set
goto EXIT
+:usage
+echo USAGE: dd2spring source-deployment-descriptor output-file-path
+echo for instance: %%UIMA_HOME%%\bin\dd2spring %%UIMA_HOME%%\examples\deploy\as\Deploy_MeetingDetectorTAE.xml c:\temp\dd2so.xml
+goto EXIT
+
:RUN
-@call "%UIMA_HOME%\bin\setUimaClassPath"
+set UIMA_CLASSPATH=%UIMA_CLASSPATH%;%UIMA_HOME%\saxon\saxon8.jar
+set UIMA_JVM_OPTS=%UIMA_JVM_OPTS% -Xmx256M
+@call "%UIMA_HOME%\bin\runUimaClass.bat" net.sf.saxon.Transform -l -s "%1" -o "%2" "%UIMA_HOME%\bin\dd2spring.xsl" %3 %4 %5 %6 %7 %8 %9
-@if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)
-@"%UIMA_JAVA_CALL%" -cp "%UIMA_CLASSPATH%;%UIMA_HOME%\saxon\saxon8.jar" "-Duima.datapath=%UIMA_DATAPATH%" -Xmx256M net.sf.saxon.Transform -l -s %1 -o %2 "%UIMA_HOME%\bin\dd2spring.xsl" %3 %4 %5 %6 %7 %8 %9
:EXIT
\ No newline at end of file
Modified: incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.sh
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.sh?rev=888000&r1=887999&r2=888000&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.sh (original)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.sh Mon Dec 7 16:58:16 2009
@@ -23,11 +23,14 @@
exit 1
fi
-if [ "$JAVA_HOME" = "" ]
+if [ "$1" = "" ]
then
- UIMA_JAVA_CALL=java
-else
- UIMA_JAVA_CALL="$JAVA_HOME/bin/java"
+ echo USAGE: dd2spring source-deployment-descriptor output-file-path
+ echo for instance: \$UIMA_HOME/bin/dd2spring \$UIMA_HOME/examples/deploy/as/Deploy_MeetingDetectorTAE.xml /tmp/dd2so.xml
+ exit 1
fi
-"$UIMA_HOME/bin/setUimaClassPath.sh"
-"$UIMA_JAVA_CALL" -cp "$UIMA_CLASSPATH:$UIMA_HOME/saxon/saxon8.jar" "-Duima.datapath=$UIMA_DATAPATH" -Xmx256M net.sf.saxon.Transform -l -s $1 -o $2 $UIMA_HOME/bin/dd2spring.xsl $3
+
+export UIMA_CLASSPATH=$UIMA_CLASSPATH:$UIMA_HOME/saxon/saxon8.jar
+export "UIMA_JVM_OPTS=$UIMA_JVM_OPTS -Xmx256M"
+
+"$UIMA_HOME/bin/runUimaClass.sh" net.sf.saxon.Transform -l -s "$1" -o "$2" "$UIMA_HOME/bin/dd2spring.xsl" $3 $4 $5 $6 $7 $8 $9