build_java.sh 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. #
  3. # War包的部署
  4. #
  5. #
  6. if [ $# -le 0 ];then
  7. echo "**********************************************"
  8. echo "use online profile"
  9. echo "**********************************************"
  10. mvn clean
  11. mvn package install -Dmaven.test.skip=true -Ponline -U
  12. else
  13. if [ "$1" == "rd" ];then
  14. echo "**********************************************"
  15. echo "use default profile(RD)"
  16. echo "**********************************************"
  17. mvn clean
  18. mvn package install -Dmaven.test.skip=true -U
  19. else
  20. echo "**********************************************"
  21. echo "use the following as profile"
  22. echo $1
  23. echo "**********************************************"
  24. mvn clean
  25. mvn package install -P$1 -U
  26. fi
  27. fi
  28. #
  29. #
  30. #
  31. if [ -d "output" ]; then
  32. printf '%s\n' "Removing output"
  33. rm -rf output
  34. fi
  35. mkdir -p output
  36. cp target/disconf-web.war output