Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can a properties file be shared among v2 custom plugins?

Stephanie Viscardi July 26, 2012

Can a properties file be shared among v2 custom plugins? If so, where should the properties file be placed and how do I access it from the plugin code?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2012

If the property file is something that needs to be retained for an upgrade, it is better to go into the home directory.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2012

You should be able to add property files in WEB-INF/classes folder and access it like this.

InputStream iStream = ClassLoaderUtils.getResourceAsStream("xx.properties", this.getClass());
    ....
p = new Properties();
p.load(iStream);

TAGS
AUG Leaders

Atlassian Community Events