LINUX下MAVEN自动构建脚本

# !/bin/sh
#
 linux maven 自动构建脚本
 
if  [  " $# "   !=   " 3 "  ]
then
  echo 
" USAGE: msd svn_project svn_username svn_passwd "
  exit
fi
 
 
SCM_PROJECT
= $ 1
SCM_SERVER
= http: // 192.168 . 1.224 / svn
SCM_USERNAME
= $ 2
SCM_PASSWORD
= $ 3
 
 
 
#  CHECKOUT PROJECT SOURCE
CURDIR = `pwd`
rm 
- fr $CURDIR / $SCM_PROJECT
svn checkout $SCM_SERVER
/ $SCM_PROJECT / trunk  -- username $SCM_USERNAME  -- password $SCM_PASSWORD
mv $CURDIR
/ trunk $CURDIR / $SCM_PROJECT
 
if  [ ! $M2_HOME ]
then
  echo 
" ERROR: env M2_HOME is not setting. "
  exit
fi
 
cd $CURDIR
/ $SCM_PROJECT /
$M2_HOME
/ bin / mvn clean
$M2_HOME
/ bin / mvn site

你可能感兴趣的:(maven,linux,SVN,脚本)