edit-icon download-icon

Praparation

Last Updated: Nov 16, 2018

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

  • Configure the EDAS private server address in Maven: Currently, third-party packages of Spring Cloud for Aliware are only published on the private servers of EDAS. You need to add the private server address in 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 of 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 configurations of the private server

Add the following configurations in the Maven configuration file settings.xml, which 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 configurations are added

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

  1. If no error is reported, the setting.xml file is correctly formatted.
  2. If edas.oss.repo is included in profiles, the configurations of the private server are added to profiles.
  3. If edas.oss.repo is included in activeProfiles, the edas.oss.repo private server is activated.

NOTE: If no error is reported when the Maven packaging command is run in the CLI but the dependency cannot be downloaded to IDE, close IDE and then start it again or see solutions in documents about how to configure Maven in IDE.

Thank you! We've received your feedback.