How to link property file in follow up plugin?
Hello,
I am having follow up plugin. I want to use property file to have some values. I created property file under resource folder which at the same level of 'src' folder. I used below code to fetch property file details,
String propFileName = "severity.properties";
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
if (inputStream != null) {
prop.load(inputStream);
System.out.println(prop.getProperty("avinash"));
System.out.println(prop.getProperty("company"));
} else {
System.out.println("null");
}
Here is the content of my build.properties,
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
src.includes = resources/
But, each and every time I am getting inputstream as a null. Please suggest.
Thanks.
I am having follow up plugin. I want to use property file to have some values. I created property file under resource folder which at the same level of 'src' folder. I used below code to fetch property file details,
String propFileName = "severity.properties";
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
if (inputStream != null) {
prop.load(inputStream);
System.out.println(prop.getProperty("avinash"));
System.out.println(prop.getProperty("company"));
} else {
System.out.println("null");
}
Here is the content of my build.properties,
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
src.includes = resources/
But, each and every time I am getting inputstream as a null. Please suggest.
Thanks.