Version API

Version conflicts are one of the challenges that face developers and DevOps engineers every day, in the Version-API, the retrieval of component versions is as simple as calling a URL with /version.

List<JKVersionInfo> versionsInfo = JKVersionManager.getInstance().getVersionsInfo();
for (JKVersionInfo versionInfo : versionsInfo) {

Where JKVersionInfo includes the following attributes for each jar that contains

  • Name: Name.

  • Version: Version number.

  • BuildTime: Building timestamp.

  • RunTime: execution timestamp.

  • DeployTime: Deployment timestamp.

The file format is discussed in the Build Info section.

In web applications, you can show the build information using the version servlet at /version URL. Of course, you can disable it by setting the jk.web.versions to false.