vFunction Logo

Building the Common Library

Run the OpenRW Recipes

The vFunction service specification file (common.json) specified two recipes:

  1. Migrate to Spring Boot 3.2

  2. Migrate to Java 17

As a result. the pom.xml file under the common folder has the openrewrite plugin with these recipes listed as active recipes.

common-pom-openew

To apply the recipes, do the following in VSCode:

  1. Right click on common under MAVEN and select Run Maven Commands…->Custom…

    Custom common

  2. Type rewrite:run in the prompt and press Enter

    Custom common 2

  3. You will see the command in the Terminal and the output. The output will print the list of modified files as warnings.

    Custom common 2

  4. Switch to the source control (git) in VSCode - there are 11 modified files:

    a. The modified java files use jakarta.persistence instead of javax.persistence

    b. The modified pom.xml file now uses the jakarta persistence-api dependency as well as newer versions, it also remove the dependency on junit and changed the build configuration to 17 (instead of source and target)

Compile the common library

  1. Click on the explorer (in VSCode) and recompile the common library by right clicking Common under MAVEN and running the commands clean and then install. The build should be successful.

  2. Commit the modified files.

vFunction Logo