
org.sparta.springwebutils.ManifestUtils Maven / Gradle / Ivy
package org.sparta.springwebutils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.jar.Manifest;
import javax.servlet.ServletContext;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Carlos Eduardo Endler Genz – Sparta Java Team
*
* History:
* Apr 9, 2014 - Carlos Eduardo Endler Genz
* Jul 21, 2015 - Daniel Conde Diehl - Adding getManifestAttribute7
*
*/
public class ManifestUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(ManifestUtils.class);
private static final String MANIFEST = "META-INF/MANIFEST.MF";
@Autowired
private ServletContext servletContext;
/**
* Retrieves a value for a specific manifest attribute.
* Or null if not found
*
* @param attributeName to locate in the manifest
* @return String value for or null case not found
*/
public String getManifestAttribute(String attributeName) {
if (attributeName != null) {
Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy