Class PropertiesUtils


  • public class PropertiesUtils
    extends Object
    • Constructor Detail

      • PropertiesUtils

        public PropertiesUtils()
    • Method Detail

      • loadOrEmptyFromClasspath

        public static <T> Properties loadOrEmptyFromClasspath​(Class<T> clazz,
                                                              String name)
      • loadPomPropertiesOrEmptyFromClasspath

        public static <T> Properties loadPomPropertiesOrEmptyFromClasspath​(Class<T> clazz,
                                                                           String groupId,
                                                                           String artifactId)
        Loads the pom.properties for an artifact from classpath.
        Type Parameters:
        T - The type of the class modeled by the given Class object
        Parameters:
        clazz - The class of which classloader should be used to read the pom.properties
        groupId - The groupId for which the pom.properties should be loaded
        artifactId - The artifactId for which the pom.properties should be loaded
        Returns:
        The loaded properties
        See Also:
        http://maven.apache.org/shared/maven-archiver/#class_archive