Skip to content

Instantly share code, notes, and snippets.

@tomkralidis
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tomkralidis/58cb3ff0a383f9579f46 to your computer and use it in GitHub Desktop.
Save tomkralidis/58cb3ff0a383f9579f46 to your computer and use it in GitHub Desktop.
OGC CITE setup / orchestration

CITE CSW helper script

  • automates building of CSW 3.0.0, CSW 2.0.2 and teamengine packages
  • set the MAVEN variable accordingly in build-cite-csw.sh
#!/bin/bash
MAVEN=/home/tkralidi/work/foss4g/apache-maven-3.0.5/bin/mvn
# you should be okay from here
if [ $# -ne 1 ]; then
cat <<END
Usage: `basename $0` <action>
all: build all components
te: build teamengine
csw3: build ets-cat30
csw2: build ets-csw202
END
exit 1
fi
THISDIR=`pwd`
TE_BASE=$THISDIR/te-base
TE_INSTALL=$THISDIR/te-install
function build_teamengine {
if [ ! -d "teamengine" ]; then
git clone https://github.com/opengeospatial/teamengine.git
cd teamengine
else
cd teamengine
git pull origin master
fi
$MAVEN install
rm -fr $TE_BASE
mkdir $TE_BASE
unzip ./teamengine-console/target/teamengine-console-*-base.zip -d $TE_BASE
rm -fr $TE_INSTALL
mkdir $TE_INSTALL
unzip ./teamengine-console/target/teamengine-console-*-base.zip -d $TE_INSTALL
cd ..
}
function build_ets-cat30 {
if [ ! -d "ets-cat30" ]; then
git clone https://github.com/opengeospatial/ets-cat30.git
cd ets-cat30
else
cd ets-cat30
rm -fr target
git pull origin master
fi
$MAVEN install
cd ..
}
function build_ets-csw202 {
if [ ! -d "ets-csw202" ]; then
git clone https://github.com/opengeospatial/ets-csw202.git
cd ets-csw202
else
cd ets-csw202
rm -fr target
git pull origin master
fi
$MAVEN install
cd ..
}
case $1 in
"te" )
build_teamengine
;;
"csw2" )
build_ets-csw202
;;
"csw3" )
build_ets-cat30
;;
"all" )
build_teamengine
build_ets-cat30
build_ets-csw202
;;
esac
cat <<END
Build(s) completed.
To run csw2 tests, cd ets-csw202 && $MAVEN test (change CSW base URL in ets-csw202/src/test/resources/sut.properties)
To run csw3 tests, cd ets-cat30 && java -jar ets-cat30/target/ets-cat30-*-aio.jar ./csw3-run-props.xml
END
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">
<comment>Test run arguments (ets-cat30)</comment>
<entry key="iut">http://example.org/csw</entry>
</properties>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment