From ecce297d8dda8eae43bc0475a386bf4499bbebba Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Mon, 9 Mar 2020 18:19:47 -0500 Subject: [PATCH] moved static guidebook script to nb --- gendocs.sh => nb/gendocs.sh | 20 ++++++++----------- nb/pom.xml | 39 +++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 27 deletions(-) rename gendocs.sh => nb/gendocs.sh (50%) diff --git a/gendocs.sh b/nb/gendocs.sh similarity index 50% rename from gendocs.sh rename to nb/gendocs.sh index f1ac0229a..ee3700a75 100755 --- a/gendocs.sh +++ b/nb/gendocs.sh @@ -1,32 +1,28 @@ #!/bin/bash # update nuxt -GUIDEBOOK="nb/target" +GUIDEBOOK="target/guidebook" -if [ ! -d "nb/target" ] +if [ ! -f "target/nb.jar" ] then - printf "You should not run this unless you have an nb/target directory.\n" - printf "It depends on the Java components to be built first.\n" + printf "You should not run this unless you have target/nb.jar\n" exit 6 fi -if [ ! -d "nb/target/guidebook" ] +if [ ! -d "target/guidebook" ] then - pushd docsys/src/main/node/docsys + pushd ../docsys/src/main/node/docsys if ! ./update.sh $@ then printf "Unable to update the guidebook static app\n" exit 2; fi - popd - printf "PWD: %s\n" $(pwd) - - cp -R docsys/src/main/resources/docsys-guidebook/ nb/target/guidebook/ + cp -R ../docsys/src/main/resources/docsys-guidebook/ target/guidebook/ else - printf "nb/target/guidebook exists, not building again until mvn clean\n" + printf "target/guidebook exists, not building again until mvn clean\n" fi JAVA=$(which java) @@ -38,7 +34,7 @@ then exit 5 fi -$JAVA -jar nb/target/nb.jar docserver generate nb/target/guidebook +$JAVA -jar target/nb.jar docserver generate target/guidebook #JAVA_HOME=${JAVA_HOME:-JAVA_HOME must be specified if java isn not in the path} # diff --git a/nb/pom.xml b/nb/pom.xml index 0264968f7..38e7e8167 100644 --- a/nb/pom.xml +++ b/nb/pom.xml @@ -180,21 +180,30 @@ - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - build-nb-appimage - package - exec - - ${project.basedir}/appimage - ${project.basedir}/appimage/build - - - - + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + build-nb-appimage + package + exec + + ${project.basedir}/appimage + ${project.basedir}/appimage/build + + + + build-static-guidebook + package + exec + + ${project.basedir} + ${project.basedir}/gendocs.sh + + + +