package.sh 401 B

123456789101112131415161718
  1. #!/bin/bash
  2. # 待编译的项目
  3. projects=("wutong-okr")
  4. mvn clean install
  5. rootDir=$(pwd)
  6. for((i=0;i< ${#projects[*]};i++));
  7. do
  8. cd ${projects[${i}]}
  9. mvn clean package -DskipTests
  10. echo "${projects[${i}]} 构建完成"
  11. mv target/*.jar ${rootDir}/target/
  12. cd ${rootDir}
  13. done
  14. echo "构建完成,文件路径:${rootDir}/target/"
  15. cp -avx service.sh ${rootDir}/target/
  16. cd ${rootDir}/target/
  17. echo $(ls)