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