@@ -9,6 +9,7 @@ Survivor=2 Old=64 NewSize=$[Survivor*10] Xmx=$[NewSize+Old] #NewSize=Survivor*(1
99JVM_OPS=" -Djava.compiler=none -Xmx${Xmx} m -Xms${Xmx} m -XX:NewSize=${NewSize} m -XX:MaxNewSize=${NewSize} m -XX:SurvivorRatio=8 -Xss228k"
1010JVM_OPS=" $JVM_OPS -Dlogserver -DcontextName=light4j"
1111# JVM_OPS="$JVM_OPS -Dapijson.enabled=true -Dapijson.debug=false -Dapijson.test=false"
12+ # JVM_OPS="$JVM_OPS -Dweixin.appid=wx78b808148023e9fa -Dweixin.appidTest=wx5bb3e90365f54b7a -Dweixin.touserTest=gh_f6216a9ae70b"
1213# ENV_OPS="PATH=/usr/java/jdk1.8.0_161/bin:$PATH"
1314JVM_OPS=" $JVM_OPS -Dlight4j.directory=/soft/softwares/library/"
1415# JVM_OPS="$JVM_OPS -Dredis.configDb=xlongwei:6379:1"
@@ -38,6 +39,7 @@ usage(){
3839 echo " deploy package fat-jar $jarfile "
3940 echo " redeploy package fat-jar $jarfile and restart"
4041 echo " keystore prepare keystore、crt、trustore"
42+ echo " install download some jars and install to local repository"
4143}
4244
4345status (){
@@ -108,6 +110,28 @@ keystore(){
108110 keytool -import -file $cert /xlongwei.pem -alias server -keystore $dir /client.truststore -storepass password
109111}
110112
113+ install (){
114+ [ ! -e target ] && mkdir target
115+ repos=http://nexus.xlongwei.com/repos/
116+ install_file " $repos " " de.rrze" " jpwgen" " 1.2.0"
117+ install_file " $repos " " com.qq.weixin.mp" " aes" " 1.6"
118+ install_file " $repos " " com.lowagie" " itext" " 2.0.8.1"
119+ install_file " $repos " " com.lowagie" " itext-asian" " 2.0.8.1"
120+ repos=https://jitpack.io/
121+ install_file " $repos " " com.github.APIJSON" " apijson-framework" " 4.2.3"
122+ install_file " $repos " " com.github.APIJSON" " apijson-orm" " 4.2.3"
123+ }
124+ install_file (){
125+ groupId=" $2 " && artifactId=" $3 " && version=" $4 " && url=" $1 ${groupId// .// } /${artifactId} /${version} /${artifactId} -${version} .jar"
126+ echo " install $url to $groupId :$artifactId :jar:$version "
127+ out=" target/${artifactId} -${version} .jar"
128+ if [ ! -e $out ]; then
129+ echo " download jar and install-file"
130+ curl -s $url -o $out
131+ mvn install:install-file -DgroupId=$groupId -DartifactId=$artifactId -Dversion=$version -Dpackaging=jar -Dfile=$out
132+ fi
133+ }
134+
111135if [ $# -eq 0 ]; then
112136 usage
113137else
125149 deploy) deploy ;;
126150 redeploy) stop && deploy && start ;;
127151 keystore) keystore $@ ;;
152+ install) install ;;
128153 * ) usage ;;
129154 esac
130155fi
0 commit comments