com.afrozaar.wordpress.wpapi.v2.util.MavenProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wp-api-v2-client-java Show documentation
Show all versions of wp-api-v2-client-java Show documentation
A Java client implementation to the WordPress WP-API v2 plugin.
package com.afrozaar.wordpress.wpapi.v2.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class MavenProperties {
private static final Logger LOG = LoggerFactory.getLogger(MavenProperties.class);
public static Properties getProperties() {
try (InputStream is = MavenProperties.class.getClassLoader().getResourceAsStream("META-INF/maven/com.afrozaar.wordpress/wp-api-v2-client-java/pom.properties")) {
Properties properties = new Properties();
try {
properties.load(is);
} catch (IOException | NullPointerException e) {
LOG.error("Error loading properties ", e);
}
return properties;
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}
public static void main(String[] args) {
getProperties().list(System.out);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy