1
0

build.bat 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. @echo off
  2. rem apollo config db info
  3. set apollo_config_db_url="jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8"
  4. set apollo_config_db_username="root"
  5. set apollo_config_db_password=""
  6. rem apollo portal db info
  7. set apollo_portal_db_url="jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8"
  8. set apollo_portal_db_username="root"
  9. set apollo_portal_db_password=""
  10. rem meta server url, different environments should have different meta server addresses
  11. set dev_meta="http://localhost:8080"
  12. set fat_meta="http://someIp:8080"
  13. set uat_meta="http://anotherIp:8080"
  14. set pro_meta="http://yetAnotherIp:8080"
  15. set META_SERVERS_OPTS=-Ddev_meta=%dev_meta% -Dfat_meta=%fat_meta% -Duat_meta=%uat_meta% -Dpro_meta=%pro_meta%
  16. rem =============== Please do not modify the following content ===============
  17. rem go to script directory
  18. cd "%~dp0"
  19. cd ..
  20. rem package config-service and admin-service
  21. echo "==== starting to build config-service and admin-service ===="
  22. call mvn clean package -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github -Dspring_datasource_url=%apollo_config_db_url% -Dspring_datasource_username=%apollo_config_db_username% -Dspring_datasource_password=%apollo_config_db_password%
  23. echo "==== building config-service and admin-service finished ===="
  24. echo "==== starting to build portal ===="
  25. call mvn clean package -DskipTests -pl apollo-portal -am -Dapollo_profile=github,auth -Dspring_datasource_url=%apollo_portal_db_url% -Dspring_datasource_username=%apollo_portal_db_username% -Dspring_datasource_password=%apollo_portal_db_password% %META_SERVERS_OPTS%
  26. echo "==== building portal finished ===="
  27. pause