Building the Application Microservices

Your generated application uses the Gradle build system. The scripts that you need to build the application microservices are generated with the code of your application by the Application Generator tool.

At this point, it it is necessary to indicate your installation credentials as described in Chapter Using the Platform Repositories.

The build of the microservices typically includes the following steps.

  1. Generating the data access code from the JDL description of your data model (stored in gene-model\spec\entities.jdl).

  2. Compiling the various libraries and services, and

  3. Running automated unit tests.

The above is performed by entering the following command in the root directory of your project.

./gradlew build
Note:

Note that:

  • The first time you run this command, it will download the Gradle tool and install it in the context of the project. The resulting files and directory (gradle, gradlew, gradlew.bat, etc.) should be committed to your version control system to ensure that all developers use the exact same version of Gradle.

  • Building the web module the first time may take several minutes because it retrieves and builds many (small) Node.js modules. Subsequent builds are faster, but if you do not customize the code of the web module, you can skip them with ./gradlew build -PwithUI=false. The withUI flag is defined in the gradle.properties file of the project root directory.