After analyzing the project requirements, the application was implemented by developing three sub-applications, specifically three microservices, and using a Java-based external SQL database named H2. The sub-applications are defined as follows:
To automate the initial execution of the system, Gradle (v8.2) was employed, and a series of “build.gradle” files were defined. These files specify how the project is compiled, manage dependencies, and configure other aspects of the build process.
The implementation strategy employs a hierarchical structure, with each microservice having its own “build.gradle” file. These microservices are then linked via dependencies to a more generic “build.gradle” file, which defines several tasks within it.
The structure ensures modularization and allows for centralized management of common build tasks. This approach enhances maintainability and streamlines the continuous delivery process.
This is how appears the main and generalized “build.gradle” file.
In the “build.gradle” file, the following tasks are defined:
These tasks are designed to streamline the build and deployment process. Running cleanAndBuildAll
ensures a fresh start by cleaning the microservices and then building them, providing a comprehensive approach to managing the application’s lifecycle.
In this next section of the page we want to highlight the best task for each each microservices that has been developed.
jacamo.infra.JaCaMoLauncher
.The runAgents
task, in particular, is crucial for launching JaCaMo applications (agents) with the necessary configurations.
com.userContext.infrastructure_layer.springBoot.UserApplication
.In the build.gradle
file of the tcm_frontend
microservice, the following task is defined for building the Vue project:
package.json
using the “npmInstallProject” task.So as a final step to actually test the build automation of the application one can simply navigate to the project root and execute the command:
gradle cleanAndBuildAll