script deploy war to weblog
Posted m.z
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了script deploy war to weblog相关的知识,希望对你有一定的参考价值。
deploy-uat-war-input.war
#!/bin/sh
DOMAIN_HOME=/u01/Oracle...../bin
WLS_LIB=/u01/Oracle/Middleware_.../elderberry/server/lib
read -p “Enter Target war file name(s):” app
DEPLOY_SRC=$app
#weblogic config
ADMINURL=t3://192.168.237.66:7001
USERNAME=weblogicuser
PASSWD=weblogicuser123
TARGET=itappau01_7511,itappau02_7511,itappau01_7509,itappau02_7509
for f in $DEPLOY_SRC
do
echo “$f”
name=“${f%.*}”
name=$(echo “$name” | grep -oP -m 1 ‘(.+?(?=-[0-9.]+))|(.+[a-z]’ | head -1)
echo “Try to undeploy — $name”
java -cp .:$CLASSPATH:$WLS_LIB/weblogic.jar weblogic.Deployer -adminurl $ADMINURL -username $USERNAME -password $PASSWD -name $name -undeploy -targets $TARGET
echo “Try to deploy — $name”
java -cp .:$CLASSPATH:$WLS_LIB/weblogic.jar weblogic.Deployer -adminurl $ADMINURL -username $USERNAME -password $PASSWD -name $name -deploy -upload $f -targets $TARGET
done
以上是关于script deploy war to weblog的主要内容,如果未能解决你的问题,请参考以下文章
Ant Deploy War to Glassfish 3 服务器在 GWT 失败
Hudson + SVN + Maven 持续集成实现自动化编译打包部署(over SSH 和 Deploy war/ear to a container 两种部署方式)