Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



One answer

Permanent link
I'm not sure it is possible. I've tried in the past without success. But generally I think it would be better to put the configurations on the process schema so they can be modified without repackage and redeploy. Why do you want to have these properties fixed inside the plugin?

1 vote

Comments

Agreed. See https://jazz.net/library/article/1000 for how to do this.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Nov 19 '15, 3:52 a.m.

Question was seen: 2,296 times

Last updated: Nov 19 '15, 8:16 a.m.

Confirmation Cancel Confirm