diff --git a/bin/classpath.sh b/bin/classpath.sh deleted file mode 100755 index 3019fbc34..000000000 --- a/bin/classpath.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" -done -DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - -dir=$1 -filename=${DIR}/../${dir}/target/.classpath.$(id -un) - -if [ -d ${DIR}/../${dir} ]; then - if [ "${RUN_MVN}" != '' ]; then - run_mvn='true' - elif [ ! -f ${filename} ]; then - run_mvn='true' - else - for pom in $(find ${DIR}/.. -name 'pom.xml'); do - if [ ${pom} -nt ${filename} ]; then - run_mvn='true' - break - fi - done - fi - - if [ "${run_mvn}" == 'true' ]; then - echo 'running maven to calculate the classpath...' >&2 - [ "${MVN_OPTS}" ] && echo "MVN_OPTS is ${MVN_OPTS}" >&2 - mvn_output="$(cd ${DIR}/.. && mvn clean compile -DskipTests ${MVN_OPTS})" - mvn_exit=$? - if [ ${mvn_exit} -ne 0 ]; then - echo "${mvn_output}" - exit ${mvn_exit} - fi - echo 'maven finished.' >&2 - else - echo 'not running maven, using cached classpath.' >&2 - fi - - if [ -f ${filename} ]; then - if [ -d ${DIR}/../${dir}/target/classes ]; then - echo "${DIR}/../${dir}/target/classes:$(cat ${filename})" - else - echo "${dir}/target/classes not found" - exit 3 - fi - else - echo "${filename} not found" - exit 2 - fi -else - echo "${dir} is not a valid directory" - exit 1 -fi diff --git a/bin/format.sh b/bin/format.sh deleted file mode 100755 index 97416fa5b..000000000 --- a/bin/format.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" -done -DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - -classpath=$(${DIR}/classpath.sh tools/format) -if [ $? -ne 0 ]; then - echo "${classpath}" - exit -fi - -java \ --Dfile.encoding=UTF-8 \ --classpath ${classpath} \ -org.visallo.tools.format.FormatVisallo diff --git a/bin/importData.sh b/bin/importData.sh deleted file mode 100755 index fd2339714..000000000 --- a/bin/importData.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" -done -DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - -classpath=$(${DIR}/classpath.sh dev/import-local) -if [ $? -ne 0 ]; then - echo "${classpath}" - exit -fi - -dir=$1 -if [ ! -d "$dir" ]; then - echo "you need to specify a data directory." - exit 1 -fi - -java \ --Xmx512m \ --Djava.awt.headless=true \ --Dfile.encoding=UTF-8 \ --Djava.library.path=$LD_LIBRARY_PATH \ --classpath ${classpath} \ -org.visallo.tools.Import \ ---datadir=${dir} \ ---queuedups - diff --git a/bin/owlExport.sh b/bin/owlExport.sh deleted file mode 100755 index a3a597324..000000000 --- a/bin/owlExport.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" -done -DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - -classpath=$(${DIR}/classpath.sh tools/cli) -if [ $? -ne 0 ]; then - echo "${classpath}" - exit -fi - -java \ --Dfile.encoding=UTF-8 \ --classpath ${classpath} \ --Xmx1024M \ -org.visallo.core.cmdline.OwlExport \ -$* diff --git a/bin/owlImport.sh b/bin/owlImport.sh deleted file mode 100755 index af89553ec..000000000 --- a/bin/owlImport.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" -done -DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - -classpath=$(${DIR}/classpath.sh tools/cli) -if [ $? -ne 0 ]; then - echo "${classpath}" - exit -fi - -java \ --Dfile.encoding=UTF-8 \ --classpath ${classpath} \ --Xmx1024M \ -org.visallo.core.cmdline.OwlImport \ -$* diff --git a/bin/setup-osx-env.sh b/bin/setup-osx-env.sh deleted file mode 100755 index 49f0bb9ae..000000000 --- a/bin/setup-osx-env.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -eu - -DIR=$(cd $(dirname "$0") && pwd) - -function _usage { - local error_message=${*:-} - if [ "${error_message}" ]; then - echo >&2 - echo >&2 $'\e[01;31mERROR:\e[00;00m' ${error_message} - fi - echo >&2 - echo >&2 '----------------------------------------------------------' - echo >&2 $'Mac OS X \e[01;31mVisallo\e[00;00m Development Environment Setup Instructions' - echo >&2 '----------------------------------------------------------' - echo >&2 - echo >&2 '1) Download and install the latest Java 8 SE Development Kit from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html' - echo >&2 '2) Download and install Docker according to the instructions found at https://docs.docker.com/installation/mac/' - echo >&2 ' DO NOT run the Docker installer post installation instructions!' - echo >&2 '3) Run this script' - echo >&2 - exit 1 -} - -function _message { - local message="$*" - echo $'\e[01;31m>>>\e[00;00m' ${message} -} - -type javac &>/dev/null || _usage 'Java compiler (javac) not found in your PATH' -type docker-machine &>/dev/null || _usage 'docker-machine not found in your PATH' - -_message 'Creating Docker virtual machine' -docker-machine create \ - --driver virtualbox \ - --virtualbox-memory 8192 \ - visallo-dev - -eval "$(docker-machine env visallo-dev)" - -_message 'Configuring Docker virtual machine' -vm_ip=$(docker-machine ssh visallo-dev ip addr show eth1 | awk '/inet / {print $2}' | awk -F / '{print $1}') -docker-machine ssh visallo-dev "sudo sed -i -e 's/visallo-dev localhost/localhost/' -e '2i ${vm_ip} visallo-dev' /etc/hosts" - -_message 'Pulling the latest Visallo development Docker image' -docker pull visallo/dev - -_message 'You can now start your Visallo development environment Docker container by running the following commands:' -_message '1) eval $(docker-machine env visallo-dev)' -_message "2) $(cd ${DIR}/../docker; pwd)/run-dev.sh" diff --git a/bin/testCoverage.sh b/bin/testCoverage.sh deleted file mode 100755 index 7ae072fef..000000000 --- a/bin/testCoverage.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This script provides an accurate code coverage report using Cobertura. Integration tests are included. -# Based on http://thomassundberg.wordpress.com/2012/02/18/test-coverage-in-a-multi-module-maven-project/ -# -# This must be run from the root project directory: -# bin/testCoverage.sh -# If you want to use your local server so the integration tests run faster, define the ITEST_SERVER env variable: -# ITEST_SERVER=visallo-dev bin/testCoverage.sh -# Note that using ITEST_SERVER wipes all data from the test server. -# - -trap 'exit' ERR - -COBERTURA_TARGET_DIR=target/cobertura -TEMP_SRC_DIR=${COBERTURA_TARGET_DIR}/src -TEST_CLASSPATH_FILE=${COBERTURA_TARGET_DIR}/classpath -REPORT_DIR=${COBERTURA_TARGET_DIR}/report -COBERTURA_SER_FILE=${COBERTURA_TARGET_DIR}/cobertura.ser - -# Instrument -mvn clean compile cobertura:instrument -find . -name generated-classes | while read dir -do - cp -R ${dir}/cobertura/* $(dirname ${dir})/classes/ - rm -r ${dir}/cobertura -done - -#Test -if [ -z "${ITEST_SERVER}" ]; then - mvn -P test-integration -Drepository.ontology=org.visallo.vertexium.model.ontology.InMemoryOntologyRepository test -else - mvn -P test-integration -Drepository.ontology=org.visallo.vertexium.model.ontology.InMemoryOntologyRepository -DtestServer=${ITEST_SERVER} test -fi - -# Merge -mkdir -p ${TEMP_SRC_DIR} -find . -name "main" | grep "/src/" | while read dir -do - cp -R ${dir}/java/ ${TEMP_SRC_DIR} -done -mvn -pl . dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=${TEST_CLASSPATH_FILE} -find . -name "*.ser" | xargs java -cp $(cat ${TEST_CLASSPATH_FILE}) net.sourceforge.cobertura.merge.Main \ - --datafile ${COBERTURA_SER_FILE} - -# Report -java -cp $(cat ${TEST_CLASSPATH_FILE}) net.sourceforge.cobertura.reporting.Main \ - --datafile ${COBERTURA_SER_FILE} --destination ${REPORT_DIR} --format html ${TEMP_SRC_DIR} -java -cp $(cat ${TEST_CLASSPATH_FILE}) net.sourceforge.cobertura.reporting.Main \ - --datafile ${COBERTURA_SER_FILE} --destination ${REPORT_DIR} --format xml ${TEMP_SRC_DIR} diff --git a/bin/webServer.sh b/bin/webServer.sh deleted file mode 100755 index 1a407ef61..000000000 --- a/bin/webServer.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" -done -DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - -classpath=$(${DIR}/classpath.sh dev/jetty-server) -if [ $? -ne 0 ]; then - echo "${classpath}" - exit -fi - -[ "${DEBUG_PORT}" ] || DEBUG_PORT=12345 -[ "$1" = '-d' ] && debug_option="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=${DEBUG_PORT}" - -cd ${DIR}/../ - -java ${debug_option} \ --Dfile.encoding=UTF-8 \ --Djava.awt.headless=true \ --Djava.security.krb5.realm= \ --Djava.security.krb5.kdc= \ --Dvisallo.request.debug=true \ --classpath ${classpath} \ --Xmx1024M \ -org.visallo.web.JettyWebServer \ ---port=8080 \ ---httpsPort=8443 \ ---keyStorePath=${DIR}/../dev/jetty-server/config/visallo-vm.visallo.org.jks \ ---keyStorePassword=password \ ---webAppDir=${DIR}/../web/war/src/main/webapp