Class ManifestFactory

java.lang.Object
com.microservices.starter.core.environment.ManifestFactory

public final class ManifestFactory extends Object
Utility class for retrieving the manifest. Also performs post processing to allow toggling the enablement state of components and supporting items based on system properties. The latter feature is useful when leveraging an existing manifest jar from which you only want to exercise a subset of the internally enabled items.
  • Method Details

    • getManifest

      public static Manifest getManifest()
    • getManifest

      public static Manifest getManifest(File manifestJar)
      Get the manifest from a jar in the file system (i.e. not on the current classpath).
      Parameters:
      manifestJar - The jar from which to harvest the manifest
      Returns:
      The extracted manifest
    • getManifestFromDir

      public static Manifest getManifestFromDir(File workDir)
      Get the manifest from a jar containing the word "manifest" in its file name in the targeted directory.
      Parameters:
      workDir - The directory in which to look for the manifest jar
      Returns:
      The extracted manifest
    • postProcess

      public static void postProcess(Manifest manifest)