build.bat 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. rem
  2. rem Copyright 2024 Apollo Authors
  3. rem
  4. rem Licensed under the Apache License, Version 2.0 (the "License");
  5. rem you may not use this file except in compliance with the License.
  6. rem You may obtain a copy of the License at
  7. rem
  8. rem http://www.apache.org/licenses/LICENSE-2.0
  9. rem
  10. rem Unless required by applicable law or agreed to in writing, software
  11. rem distributed under the License is distributed on an "AS IS" BASIS,
  12. rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. rem See the License for the specific language governing permissions and
  14. rem limitations under the License.
  15. rem
  16. @echo off
  17. rem apollo config db info
  18. set apollo_config_db_url="jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8"
  19. set apollo_config_db_username="root"
  20. set apollo_config_db_password=""
  21. rem apollo portal db info
  22. set apollo_portal_db_url="jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8"
  23. set apollo_portal_db_username="root"
  24. set apollo_portal_db_password=""
  25. rem meta server url, different environments should have different meta server addresses
  26. set dev_meta="http://localhost:8080"
  27. set fat_meta="http://someIp:8080"
  28. set uat_meta="http://anotherIp:8080"
  29. set pro_meta="http://yetAnotherIp:8080"
  30. set META_SERVERS_OPTS=-Ddev_meta=%dev_meta% -Dfat_meta=%fat_meta% -Duat_meta=%uat_meta% -Dpro_meta=%pro_meta%
  31. rem =============== Please do not modify the following content ===============
  32. rem go to script directory
  33. cd "%~dp0"
  34. cd ..
  35. rem package config-service and admin-service
  36. echo "==== starting to build config-service and admin-service ===="
  37. 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%
  38. echo "==== building config-service and admin-service finished ===="
  39. echo "==== starting to build portal ===="
  40. 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%
  41. echo "==== building portal finished ===="
  42. pause