summaryrefslogtreecommitdiffstats
path: root/activiti-extension
diff options
context:
space:
mode:
authorZhaoxing <meng.zhaoxing1@zte.com.cn>2017-10-14 08:25:30 +0800
committerZhaoxing <meng.zhaoxing1@zte.com.cn>2017-10-14 08:25:30 +0800
commit969e3c70a50c58b00c63900f1fcb9317034ec057 (patch)
tree302dd4e057d2a7bb66aea6ed28dff152bce7ffbf /activiti-extension
parentda675ef4d11d68ad537390ce99bb4eb5bd7d1bbb (diff)
Fix the docker build error for vfc-nfvo-wfengine
Change-Id: Ie688ce54b49a0a5e9b03a949b031abc4faa58947 Issue-id: VFC-445 Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
Diffstat (limited to 'activiti-extension')
-rw-r--r--activiti-extension/src/main/docker/activiti-docker-build_image.sh25
1 files changed, 20 insertions, 5 deletions
diff --git a/activiti-extension/src/main/docker/activiti-docker-build_image.sh b/activiti-extension/src/main/docker/activiti-docker-build_image.sh
index 0e8d9d6..67e9e7e 100644
--- a/activiti-extension/src/main/docker/activiti-docker-build_image.sh
+++ b/activiti-extension/src/main/docker/activiti-docker-build_image.sh
@@ -14,6 +14,10 @@ IMAGE="wfengine-activiti"
DOCKER_REPOSITORY="nexus3.onap.org:10003"
IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
+if [ -z $NEXUS_REPOS_URL ]; then
+ NEXUS_REPOS_URL="https://nexus.onap.org"
+fi
+
POM_DIR="../../../"
cd ${POM_DIR}
@@ -79,8 +83,8 @@ mkdir build
cp -Rf ./Dockerfile ./build
echo "download Tomcat 8.5.23"
-#curl "${CURLPROXY}" -m 300 -O -J -L "http://mirrors.shuosc.org/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz"
-wget "http://repo1.maven.org/maven2/org/apache/tomcat/tomcat/8.5.23/tomcat-8.5.23.tar.gz"
+#curl "${CURLPROXY}" -m 300 -O -J -L "${NEXUS_REPOS_URL}/content/repositories/central/org/apache/tomcat/tomcat/8.5.23/tomcat-8.5.23.tar.gz"
+wget "${NEXUS_REPOS_URL}/content/repositories/central/org/apache/tomcat/tomcat/8.5.23/tomcat-8.5.23.tar.gz"
tar -zxf tomcat-8.5.23.tar.gz
mv apache-tomcat-8.5.23 ./build/apache-tomcat
@@ -96,8 +100,8 @@ unzip -o -q activiti-5.22.0.zip "activiti-5.22.0/wars/activiti-rest.war" -d ./
mv activiti-5.22.0/wars/activiti-rest.war .
echo "download activiti-extension ${VERSION}"
-#curl "${CURLPROXY}" -m 600 -O -J -L "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}"
-wget -O activiti-extension.jar "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}"
+#curl "${CURLPROXY}" -m 600 -O -J -L "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}"
+wget -O activiti-extension.jar "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}"
rm -Rf ./temp/
mkdir -p ./temp/WEB-INF/lib/
cp -f activiti-extension*.jar ./temp/WEB-INF/lib/activiti-extension.jar
@@ -107,13 +111,24 @@ jarcmd=$(whereis jar | grep ^jar |awk '{print $2}')
if [ 1$jarcmd != 1 ]; then
echo $jarcmd
elif [ $JAVA_HOME ]; then
- jarcmd=$JAVA_HOME/bin/jar
+ if [ -f "$JAVA_HOME/bin/jar"]; then
+ jarcmd=$JAVA_HOME/bin/jar
+ elif [ -f "$JAVA_HOME/../bin/jar"]; then
+ jarcmd=$JAVA_HOME/../bin/jar
+ else
+ echo "Jar is not installed, JAVA_HOME=$JAVA_HOME"
+ exit 1
+ fi
elif [ -f "/usr/lib/jvm/java-8-openjdk-amd64/bin/jar" ]; then
jarcmd="/usr/lib/jvm/java-8-openjdk-amd64/bin/jar"
+elif [ -f "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jar" ]; then
+ jarcmd="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jar"
else
+ echo "Jar is not installed, jarcmd=$jarcmd"
exit 1
fi
echo "jarcmd=${jarcmd}"
+
$jarcmd -uvf activiti-rest.war -C ./temp/ ./
#. >/dev/null 2>&1 -C ./temp
cp activiti-rest.war ./build/apache-tomcat/webapps/