欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

java class打jar包

程序员文章站 2022-05-01 19:17:43
...

java class打jar包

#!/bin/bash -ilex

#set variable
svnJarPath=/home/opser/cm-sites3.0/upFile/upVersionFile/jar
targetFilePath=/home/opser/cm-sites3.0/upFile
upPackage=$1
upFullPath=${targetFilePath}/${upPackage}

#set sys env
export JAVA_HOME=/usr/local/jdk1.8.0_212
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH

#script
echo "1.0 svn update ..."
cd /home/opser/cm-sites3.0/upFile/upVersionFile
#svn update

echo "2.0 mkdir ..."
mkdir -p ${upFullPath}/jar/
cd ${upFullPath}/jar/
mkdir app-publish contribute file mmp pms publish search statistics storage-server sys

echo "3.0 class to jar package ..."

cd ${svnJarPath}/app-publish
jar -cfM0 ${upFullPath}/jar/app-publish/cm-sites-app-publish-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/contribute
jar -cfM0 ${upFullPath}/jar/contribute/cm-sites-contribute-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/file
jar -cfM0 ${upFullPath}/jar/file/cm-sites-file-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/mmp
jar -cfM0 ${upFullPath}/jar/mmp/cm-sites-mmp-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/pms
jar -cfM0 ${upFullPath}/jar/pms/cm-sites-pms-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/publish
jar -cfM0 ${upFullPath}/jar/publish/cm-sites-publish-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/search
jar -cfM0 ${upFullPath}/jar/search/cm-sites-search-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/statistics
jar -cfM0 ${upFullPath}/jar/statistics/cm-sites-statistics-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/storage-server
jar -cfM0 ${upFullPath}/jar/storage-server/cm-sites-storage-server-3.0-SNAPSHOT.jar *

cd ${svnJarPath}/sys
jar -cfM0 ${upFullPath}/jar/sys/cm-sites-sys-3.0-SNAPSHOT.jar *

echo "3.0 copy static file ..."
cd /home/opser/cm-sites3.0/upFile/upVersionFile/
cp -rf ./html ${upFullPath}/
cp -rf ./react ${upFullPath}/

echo "file backup finish"

相关标签: java