Example usage for org.apache.commons.io.manifest ManifestUtils STANDARD_VERSION_ATTRS_NAMES

List of usage examples for org.apache.commons.io.manifest ManifestUtils STANDARD_VERSION_ATTRS_NAMES

Introduction

In this page you can find the example usage for org.apache.commons.io.manifest ManifestUtils STANDARD_VERSION_ATTRS_NAMES.

Prototype

List STANDARD_VERSION_ATTRS_NAMES

To view the source code for org.apache.commons.io.manifest ManifestUtils STANDARD_VERSION_ATTRS_NAMES.

Click Source Link

Document

A List of standard attributes used in manifests to provide version information

Usage

From source file:net.community.chest.gitcloud.facade.AbstractContextInitializer.java

protected void showArtifactsVersions() {
    scanArtifactsManifests(new Predicate<Pair<URL, Manifest>>() {
        @Override//from  w w w  .  java  2 s  . com
        @SuppressWarnings("synthetic-access")
        public boolean evaluate(Pair<URL, Manifest> e) {
            URL url = e.getKey();
            Manifest manifest = e.getValue();
            Pair<Attributes.Name, String> versionInfo = ManifestUtils.findFirstManifestAttributeValue(manifest,
                    ManifestUtils.STANDARD_VERSION_ATTRS_NAMES);
            if (versionInfo == null) {
                logger.info(
                        "showArtifactsVersions(" + url.toExternalForm() + ") no version information extracted");
            } else {
                logger.info("showArtifactsVersions(" + url.toExternalForm() + ")[" + versionInfo.getLeft()
                        + "]: " + versionInfo.getRight());
            }

            return false; // don't stop
        }
    });
}