Overview
Infosys Equinox’s Commerce 8 platform is built primarily using Java, Spring Boot, and Camel. The platform exposes its API through a series of REST-based endpoints. This article describes the tools used to invoke the platform, build Java-based programs on top of the platform SDK, and extend the platform’s microservices and orchestration. This is one of the ways to develop solutions on the Infosys Equinox Commerce platform, but there could be other ways as well. These notes are written for both MacOS and Windows environments. The installation instructions follow a logical progression, starting with Postman and Java, then the SDK, and finally the tools necessary to build platform extensions.
Tool Versions
As of this writing (June 2019) we are using the following tool versions: [table “134” not found /]
See the sections that follow for Tool download URLs and installation instructions.
Tools for Calling Services and for Running the Microservices and Orchestration Locally
Postman
We use Postman to exercise both the Microservice and Orchestrated endpoints as a quick way to get familiar with Infosys Equinox platform APIs. Postman permits the posting of requests to REST endpoints, the parsing of those responses, and light scripting to chain a series of requests into a coherent workflow. Download the Postman from https://www.getpostman.com/downloads/ and follow the installation instructions.
Java and the Java JDK
Java
Complex applications can be built in Java using Infosys Equinox’s Java SDKs. To test whether your Java installation is current, issue the command java -version at a Windows Command prompt or in a Mac Terminal session. Your result should be similar to the following:
If your results are not similar, follow the instructions at https://java.com/en/download/help/download_options.xml.
Java Development Kit
Note: if you wish to modify or extend services or use the SDK, you need to install a full Java Development Kit (JDK), not merely a Java runtime (JRE). To test whether the Java JDK is installed, issue the command javac -version at a Windows Command prompt or in a Mac Terminal session. Your result should be similar to the following:
For detailed JDK installation instructions for your specific operating system, see the links below.
- JDK Install on Windows at https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html
- JDK Install on MacOS at https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#CHDBADCG
Tools for Developing on the SDK and Extending Services
Maven
Maven is used to manage dependencies and perform automated builds of software projects. We use a standalone Maven, even when building projects in Eclipse or Spring Tool Suite.
Installation
Download Maven for your operating system from https://maven.apache.org/download.cgi?Preferred=ftp://mirror.reverse.net/pub/apache/. Follow the installation instructions at https://maven.apache.org/install.html to complete the installation and setup.
Configure Your Environment Variables
Configure the Environment variables in the bash_profile file after installation.
- Open your Bash Profile
- In your MacOS terminal run:
touch ~/.bash_profile open ~/.bash_profile
-
- Make your edits and save. This is generic so make sure your path is correct in the above example.
export JAVA_HOME=$(/usr/libexec/java_home) export PATH=/Users/pamkelly/downloads/apache-maven-3.6.1/bin:$PATH
- Make your edits and save. This is generic so make sure your path is correct in the above example.
-
- In windows you will need to open your system settings and edit your environment variables, setting them to match your paths:
- Verify Maven version after updating the bash_profile file
- In a MacOS terminal session, run mvn -v
- At a Windows command prompt, run mvn -v
Spring Tools Suite
Installation
We use Spring Tools Suite (STS) in all of our examples and testing, but any current Eclipse with GIT and Maven support should work well. Download STS for your operating system from https://spring.io/tools. Once you’ve installed STS or Eclipse, you will need to set up the external Maven as follows:
Configuring JDK in STS
- Launch the Spring Tool Suite
- Select Preferences… under the Spring Tool Suite in the header
- Drill down to Java-> Installed JREs
- Click the Add… button
- Select Standard VM
- Click the Next button
- Click the Directory button
- Browse to your JDK path
- Click the Open button
- Click the Finish button
- Click the Apply and Close button
Configuring Maven in STS
- Launch the Spring Tool Suite
- Select Preferences under the Spring Tool Suite in the header
- Drill down to Maven-> User Settings
- Browse to your Apache Maven settings.xml file for both Global and User Settings
- Click the Update Settings button
- Click the Apply and Close button
Project Lombok
Infosys Equinox uses Project Lombok to manage getters and setters.
Installation
Download lombok-1.16.2.jar from https://projectlombok.org/all-versions. See below or 3. Lombok in Eclipse at https://www.baeldung.com/lombok-ide for installation details. Note: More recent Spring Tool installations have issues with the Lombok’s installer. See below for the work around mentioned at https://stackoverflow.com/questions/52780535/lombok-with-spring-tool-suite-4 (see post re renaming files).
- Rename the SpringToolSuite4.ini file (on MacOS under Show Package Content->Content->Eclipse) to sts.ini.
- Launch lombok-1.16.2.jar
- Click the OK button on the warning screen
- Click the Specify location button
- Select the sts.ini file and click the Open button
- Click the Install / Update button
- Click the OK button
- Rename the sts.ini file back to SpringToolSuite4.ini
- Edit the SpringToolSuite4.ini file and change the last line the file from -javaagent:lombok.jar to -javaagent:/Applications/SpringToolSuite4.app/Contents/Eclipse/lombok.jar
- Save and close the file
- Launch Spring Tool Suite to ensure it runs properly. The About Spring Tool Suite screen should show that Lombok is installed.
Code Sources
The Infosys Equinox SDK is stored in the Infosys Equinox Enablement Artifactory (“Artifactory”) and can be included as dependencies. The samples for the Infosys Equinox SDK are stored as projects on GitHub and can be browsed at https://github.com/skava19/enablement.
Pulling Sources from the Artifactory
To pull the sources from the Artificatory, modify the settings.xml in your mvn home (usersyourid.m2 on Windows and ~/.m2 on MacOS) to include the following:
<repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release-local</name> <url>https://artifactory.skavaone.com/artifactory/libs-release-local/</url> </repository> <repository> <snapshots/> <id>snapshots</id> <name>libs-snapshot-local</name> <url>https://artifactory.skavaone.com/artifactory/libs-snapshot-local/</url> </repository> |
This will enable resolving the SDK Jars from the Artifactory. For further details on configuring the Maven settings.xml file at https://maven.apache.org/guides/mini/guide-configuring-maven.html.
Dependencies
The dependencies for the Infosys Equinox SDK in a Maven POM file take the following form:
Syntax
<dependency> <groupId>com.skava.sdk</groupId> <artifactId><microservice name></artifactId> <version><version number></version> </dependency> |
For the list of microservices and the latest available version, see Exposed SDK Artifacts.
Example
<dependency> <groupId>com.skava.sdk</groupId> <artifactId>account-services</artifactId> <version>8.14.5.RELEASE</version> </dependency> |
Gradle
To reference the SDK in Gradle, use the following standard form:
Syntax
compile(group: ‘com.skava.sdk’, name: ‘<microservice name>‘, version: ‘<version number>‘) |
For the list of microservices and the latest available version, see Exposed SDK Artifacts.
Example
compile(group: ‘com.skava.sdk’, name: ‘account-services’, version: ‘8.14.5.RELEASE’) |
Exposed SDK Artifacts
The following table lists the microservices and the latest available version of the SDK artifacts:
Sl. # | Microservice/SDK Name | Available Version Number |
---|---|---|
1. | account-services | 8.14.5.RELEASE |
2. | address-services | 8.14.5.RELEASE |
3. | authorization-services | 8.14.5.RELEASE |
4. | cart-services | 8.14.5.RELEASE |
5. | catalog-services | 8.14.5.RELEASE |
6. | feed-services | 8.14.5.RELEASE |
7. | feedjobs-services | 8.14.5.RELEASE |
8. | foundation-services | 8.14.5.RELEASE |
9. | inventory-services | 8.14.5.RELEASE |
10. | list-services | 8.14.5.RELEASE |
11. | loyalty-services | 8.14.5.RELEASE |
12. | merchandising-services | 8.14.5.RELEASE |
13. | notification-services | 8.14.5.RELEASE |
14. | orchestration-services | 8.14.5.RELEASE |
15. | order-services | 8.14.5.RELEASE |
16. | payment-services | 8.14.5.RELEASE |
17. | pricing-services | 8.14.5.RELEASE |
18. | promotion-services | 8.14.5.RELEASE |
19. | ratingsreviews-services | 8.14.5.RELEASE |
20. | reporting-services | 8.14.5.RELEASE |
21. | rulesmanager-services | 8.14.5.RELEASE |
22. | search-services | 8.14.5.RELEASE |
23. | shipping-services | 8.14.5.RELEASE |
24. | subscription-services | 8.14.5.RELEASE |
25. | tax-services | 8.14.5.RELEASE |
26. | user-services | 8.14.5.RELEASE |
Revision History
2023-07-06 | JP – Updated the content for SDK.
2022-04-10 | JP – Fixed link and http issues.
2021-06-10 | JP – Updated the artifactory changes.
2020-11-26 | JP – Updated for Release 8.9.3.
2020-06-17 | JP – Updated for Release 8.8.1.
2020-03-27 | JP – Minor edits.
2020-02-25 | JP – Content updated for Release 8.6.0.
2019-07-03 | PLK – Minor formatting edits.
2019-06-17 | PLK – Minor copyedit and image added.
2019-06-10 | PLK – Minor copyedit.
2019-06-09 | PLK – Content uploaded.
2019-06-03 | PLK – Page added.