Package akka.util

Class ManifestInfo

  • All Implemented Interfaces:
    Extension

    public final class ManifestInfo
    extends java.lang.Object
    implements Extension
    Utility that extracts ManifestInfo#Version information from META-INF/MANIFEST.MF in jar files on the classpath. Note that versions can only be found in ordinary jar files, for example not in "fat jars' assembled from many jar files.
    • Method Detail

      • apply

        public static T apply​(ActorSystem system)
      • hashCode

        public static final int hashCode()
      • equals

        public static final boolean equals​(java.lang.Object other)
      • versions

        public scala.collection.immutable.Map<java.lang.String,​ManifestInfo.Version> versions()
        Versions of artifacts from known vendors.
      • checkSameVersion

        public boolean checkSameVersion​(java.lang.String productName,
                                        scala.collection.immutable.Seq<java.lang.String> dependencies,
                                        boolean logWarning)
        Verify that the version is the same for all given artifacts.

        If configuration akka.fail-mixed-versions=on it will throw an IllegalStateException if the versions are not the same for all given artifacts.

        Returns:
        true if versions are the same
      • checkSameVersion

        public boolean checkSameVersion​(java.lang.String productName,
                                        scala.collection.immutable.Seq<java.lang.String> dependencies,
                                        boolean logWarning,
                                        boolean throwException)
        Verify that the version is the same for all given artifacts.

        If throwException is true it will throw an IllegalStateException if the versions are not the same for all given artifacts.

        Returns:
        true if versions are the same