MAVEN Package Deployment Script

Source: Internet
Author: User

#!/Bin/Shsvn_user_name=Svn_password=Root_path=$1Project_Name=$2ACTION=$3Svn_lib_root=$4User_account=$5PASSWORD=$6HOST=$7PORT=$8COMMAND=$9Netty_common='Netty-common'Netty_common_server='Netty-common-server'netty_common_client='netty-common-client'Netty_chat_common='Netty-chat-common'tip () {echo "usage:deploy_base.sh root_path project_name ACTION svn_lib_root user_account PASSWORD HOST COMMAND"} #up Date_src () {#if [- D $]; Then#cd $1#svnUpdate#Else#svn Co svn://Svn.iweju.com/Yueba/Server/Src/Branches/Trunk_taiwang/$1 --Username $--password $ $#cd $1#fi #}mvn_pkg () {mvn package}mvn_install () {mvn install}update_lib () {Path="$1-Lib "if [- D $path]; ThenCD $PATHSVNUpdateElseSVN Co $4/$1/Lib--username $--password $ $pathCD $PATHFI}cp_lib () {CP target/Lib/*. Jar "$1-lib" CP Target/*.jar "$1-lib"}commit_lib () {CD "$1-lib" svn add *.jarsvn commit-m "package & Deploy $"}resta  RT () {auto_login_ssh $ [email protected]$3 $4 $COMMAND}auto_login_ssh () {expect-c "set Timeout-1;spawn-noecho SSH -P $3-o stricthostkeychecking=no $ ${@:4};expect *assword:*;send-$1\r;interact; ";} If [$#-lt 8];thentipexit 0;ficase "$ACTION" Inrestart) restart $PASSWORD $USER _account $HOST $PORT;; Deploy | Deploy_delete) CD $ROOT _pathif [-d]. /$netty _common/"];THENCD. /$netty _common/mvn_installfiif [-d]. /$netty _common_server/"];THENCD. /$netty _common_server/mvn_installfiif [-d]. /$netty _common_client/"];THENCD. /$netty _common_client/mvn_installfiif [-d]. /$netty _chat_common/"];THENCD. /$netty _chat_common/mvn_installfiif [-d]. /$netty _common/"];THENCD. /$PROJECT _name/fimvn_pkgupdate_lib $PROJECT _name $SVN _user_name $SVN _password $SVN _lib_rootcd. /cp_lib $PROJECT _namecommit_lib $PROJECT _namecd. /restart $PASSWORD $USER _account $HOST$PORT;; *) Tipesacexit 1

MAVEN Package Deployment Script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.