Version API

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

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

Where JKVersionInfo includes the following attributes for each jar the contains build.properties:

  • Name : Name

  • Version: Version number

  • BuildTime: Building timestamp

  • RunTime: execution timestamp

  • DeployTime: Deployment timestamp.

The file format is discussed in 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 setting the jk.web.versions to false