scripts/alt2xml.sh
author František Kučera <franta-hg@frantovo.cz>
Mon, 16 Jun 2014 22:15:18 +0200
changeset 49 bec481687c1b
parent 43 058c1c39251e
child 51 d79b818c364b
permissions -rwxr-xr-x
out-xpath: class skeletons
     1 #!/bin/bash
     2 
     3 DIR="`dirname $0`/..";
     4 
     5 STANDARD_JARS=(
     6 	"$DIR/java/alt2xml-cli/dist/alt2xml-cli.jar"
     7 	"$DIR/java/alt2xml-lib-input/dist/alt2xml-lib-input.jar"
     8 	"$DIR/java/alt2xml-lib-output/dist/alt2xml-lib-output.jar"
     9 );
    10 
    11 INPUT_PLUGINS=(
    12 	"$DIR/java/alt2xml-in-properties/dist/alt2xml-in-properties.jar"
    13 	
    14 	"$DIR/java/alt2xml-in-json/dist/alt2xml-in-json.jar"
    15 	"$DIR/../temp/lib/json_simple-1.1.jar"
    16 );
    17 
    18 OUTPUT_PLUGINS=(
    19 	"$DIR/java/alt2xml-out-xml/dist/alt2xml-out-xml.jar"
    20 );
    21 
    22 for e in "${STANDARD_JARS[@]}" "${INPUT_PLUGINS[@]}" "${OUTPUT_PLUGINS[@]}"; do
    23 	CLASS_PATH="$CLASS_PATH:$e";
    24 done
    25 
    26 MAIN_CLASS="cz.frantovo.alt2xml.cli.CLI";
    27 
    28 SAX_PARSER_FACTORY_ALT="cz.frantovo.alt2xml.ParserFactory";                             # our alternative ParserFactory as default
    29 SAX_PARSER_FACTORY_XML="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";  # former default factory as fallback 
    30 
    31 java \
    32 	-cp "$CLASS_PATH" \
    33 	-D"javax.xml.parsers.SAXParserFactory=$SAX_PARSER_FACTORY_ALT" \
    34 	-D"cz.frantovo.alt2xml.fallback.javax.xml.parsers.SAXParserFactory=$SAX_PARSER_FACTORY_XML" \
    35 	$MAIN_CLASS \
    36 	"$@"
    37