edit-icon download-icon

Preparation

Last Updated: Feb 02, 2019

To use Pandora Boot for application development, you must configure the following development environment:

  • Configure the EDAS private server address in Maven: Currently, third-party Spring Cloud packages for Aliware are only available on EDAS private servers. Therefore, you must add a private server address into the Maven configuration file.

  • Configure the lightweight configuration center: You need to enable the lightweight configuration center for local development and commissioning.The lightweight configuration center provides a lightweight version with EDAS service discovery and configuration management features.

Configure the EDAS private server address in Maven

Note: Maven 3.x or later is required. Add the EDAS private server address in the Maven configuration file settings.xml.

Add EDAS private server settings

Add the following settings in the Maven configuration file settings.xml, whose path is generally ~/.m2/settings.xml:

  1. <profiles>
  2. <profile>
  3. <id>nexus</id>
  4. <repositories>
  5. <repository>
  6. <id>central</id>
  7. <url>http://repo1.maven.org/maven2</url>
  8. <releases>
  9. <enabled>true</enabled>
  10. </releases>
  11. <snapshots>
  12. <enabled>true</enabled>
  13. </snapshots>
  14. </repository>
  15. </repositories>
  16. <pluginRepositories>
  17. <pluginRepository>
  18. <id>central</id>
  19. <url>http://repo1.maven.org/maven2</url>
  20. <releases>
  21. <enabled>true</enabled>
  22. </releases>
  23. <snapshots>
  24. <enabled>true</enabled>
  25. </snapshots>
  26. </pluginRepository>
  27. </pluginRepositories>
  28. </profile>
  29. <profile>
  30. <id>edas.oss.repo</id>
  31. <repositories>
  32. <repository>
  33. <id>edas-oss-central</id>
  34. <name>taobao mirror central</name>
  35. <url>http://edas-public.oss-cn-hangzhou.aliyuncs.com/repository</url>
  36. <snapshots>
  37. <enabled>true</enabled>
  38. </snapshots>
  39. <releases>
  40. <enabled>true</enabled>
  41. </releases>
  42. </repository>
  43. </repositories>
  44. <pluginRepositories>
  45. <pluginRepository>
  46. <id>edas-oss-plugin-central</id>
  47. <url>http://edas-public.oss-cn-hangzhou.aliyuncs.com/repository</url>
  48. <snapshots>
  49. <enabled>true</enabled>
  50. </snapshots>
  51. <releases>
  52. <enabled>true</enabled>
  53. </releases>
  54. </pluginRepository>
  55. </pluginRepositories>
  56. </profile>
  57. </profiles>
  58. <activeProfiles>
  59. <activeProfile>nexus</activeProfile>
  60. <activeProfile>edas.oss.repo</activeProfile>
  61. </activeProfiles>

Download the setting.xml sample file.

Check whether the settings have been successfully added

Run the mvn help:effective-settings command on the CLI.

  1. If no error is returned, the setting.xml file is correctly formatted.
  2. If edas.oss.repo is included in profiles, the private server settings have been added to profiles.
  3. If edas.oss.repo is included in activeProfiles, the edas.oss.repo private server has been activated.

Note: If no error is returned when you run the Maven packaging command on the CLI, but IDE still cannot download the dependency, close IDE and start it again or search for a solution in the documentation for configuring Maven in IDE.

Thank you! We've received your feedback.