From cc2eca9ec997b557ec37deb6fde8ea3f458c7700 Mon Sep 17 00:00:00 2001
From: Nikolaus Krismer <nikolaus.krismer@uibk.ac.at>
Date: Tue, 3 Dec 2013 11:50:51 +0000
Subject: [PATCH] only installing neo4j-server-plugin if geoserver is installed
 now...

---
 etc/vagrant/bootstrap.sh | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/etc/vagrant/bootstrap.sh b/etc/vagrant/bootstrap.sh
index 660f1112..853c586e 100644
--- a/etc/vagrant/bootstrap.sh
+++ b/etc/vagrant/bootstrap.sh
@@ -336,13 +336,17 @@ if $INSTALL_NEO4J_SPATIAL; then
 	cd $DEPLOY_DIR/neo4j-spatial
 	git checkout -q $NEO4J_SPATIAL_VERSION  > /dev/null 2>&1
 
-	if $IMPORT_DATA; then
-		# We need to compile the source when importing data, so that the main class gets compiled
-		mvn clean install -DskipTests > $WORKING_DIR/install_neo4j_spatial.log 2>&1
-		unzip -o $DEPLOY_DIR/neo4j-spatial/target/*server-plugin.zip -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver/WEB-INF/lib > $WORKING_DIR/install_neo4j_spatial_plugin.log 2>&1
-	else
-		download_newer $DOWNLOAD_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip http://dist.neo4j.org.s3.amazonaws.com/spatial/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip
-		unzip -o $DOWNLOAD_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver/WEB-INF/lib > $WORKING_DIR/install_neo4j_spatial_plugin.log 2>&1
+	if $INSTALL_GEOSERVER; then
+		if $IMPORT_DATA; then
+			# We need to compile the source when importing data, so that the main class gets compiled
+			echo "Installing neo4-spatial into geoserver from source"
+			mvn clean install -DskipTests > $WORKING_DIR/install_neo4j_spatial.log 2>&1
+			unzip -o $DEPLOY_DIR/neo4j-spatial/target/*server-plugin.zip -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver/WEB-INF/lib > $WORKING_DIR/install_neo4j_spatial_plugin.log 2>&1
+		else
+			echo "Installing neo4-spatial into geoserver from binary"
+			download_newer $DOWNLOAD_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip http://dist.neo4j.org.s3.amazonaws.com/spatial/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip
+			unzip -o $DOWNLOAD_DIR/neo4j-spatial-$NEO4J_SPATIAL_VERSION-server-plugin.zip -d $DEPLOY_DIR/$TOMCAT_PKG_NAME/webapps/geoserver/WEB-INF/lib > $WORKING_DIR/install_neo4j_spatial_plugin.log 2>&1
+		fi
 	fi
 	cd $WORKING_DIR
 fi
-- 
GitLab