franta-hg@22: #!/bin/bash franta-hg@22: franta-hg@22: DIR="`dirname $0`/.."; franta-hg@22: franta-hg@22: STANDARD_JARS=( franta-hg@22: "$DIR/java/alt2xml-cli/dist/alt2xml-cli.jar" franta-hg@32: "$DIR/java/alt2xml-lib-input/dist/alt2xml-lib-input.jar" franta-hg@40: "$DIR/java/alt2xml-lib-output/dist/alt2xml-lib-output.jar" franta-hg@22: ); franta-hg@22: franta-hg@43: INPUT_PLUGINS=( franta-hg@22: "$DIR/java/alt2xml-in-properties/dist/alt2xml-in-properties.jar" franta-hg@23: franta-hg@23: "$DIR/java/alt2xml-in-json/dist/alt2xml-in-json.jar" franta-hg@26: "$DIR/../temp/lib/json_simple-1.1.jar" franta-hg@22: ); franta-hg@22: franta-hg@43: OUTPUT_PLUGINS=( franta-hg@43: "$DIR/java/alt2xml-out-xml/dist/alt2xml-out-xml.jar" franta-hg@51: "$DIR/java/alt2xml-out-xpath/dist/alt2xml-out-xpath.jar" franta-hg@51: "$DIR/java/alt2xml-out-xslt/dist/alt2xml-out-xslt.jar" franta-hg@43: ); franta-hg@43: franta-hg@43: for e in "${STANDARD_JARS[@]}" "${INPUT_PLUGINS[@]}" "${OUTPUT_PLUGINS[@]}"; do franta-hg@22: CLASS_PATH="$CLASS_PATH:$e"; franta-hg@22: done franta-hg@22: franta-hg@22: MAIN_CLASS="cz.frantovo.alt2xml.cli.CLI"; franta-hg@22: franta-hg@34: SAX_PARSER_FACTORY_ALT="cz.frantovo.alt2xml.ParserFactory"; # our alternative ParserFactory as default franta-hg@34: SAX_PARSER_FACTORY_XML="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"; # former default factory as fallback franta-hg@22: franta-hg@34: java \ franta-hg@34: -cp "$CLASS_PATH" \ franta-hg@34: -D"javax.xml.parsers.SAXParserFactory=$SAX_PARSER_FACTORY_ALT" \ franta-hg@34: -D"cz.frantovo.alt2xml.fallback.javax.xml.parsers.SAXParserFactory=$SAX_PARSER_FACTORY_XML" \ franta-hg@34: $MAIN_CLASS \ franta-hg@34: "$@" franta-hg@34: