com.buschmais.jqassistant.scm.maven.configuration.source.MavenPropertiesConfigSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jqassistant-maven-plugin Show documentation
Show all versions of jqassistant-maven-plugin Show documentation
jQAssistant plugin for Apache Maven to integrate jQAssistant
into a Maven based project.
The newest version!
package com.buschmais.jqassistant.scm.maven.configuration.source;
import java.util.Properties;
import java.util.Set;
import io.smallrye.config.common.AbstractConfigSource;
/**
* Config source for properties provided by Maven.
*/
public class MavenPropertiesConfigSource extends AbstractConfigSource {
public static final int CONFIGURATION_ORDINAL_MAVEN_PROPERTIES = 90;
private Properties properties;
public MavenPropertiesConfigSource(Properties properties, String name) {
super(name, CONFIGURATION_ORDINAL_MAVEN_PROPERTIES);
this.properties = properties;
}
@Override
public Set getPropertyNames() {
return properties.stringPropertyNames();
}
@Override
public String getValue(String key) {
return properties.getProperty(key);
}
}