|[tycho-user] Conventions/procedures for using properties file resources in Tycho-built applications?|
In the Eclipse codebase I inherited, which uses Tycho, I'm going to have to define some properties that are used at runtime, the values of which will be stored in the POM for the plugin (of several in a multiproject build) that needs to access these properties.
As this is my first experience with Tycho and an Eclipse application build, and as I've found some aspects of the Tycho build process somewhat surprising, I'm wondering whether there are particular conventions I should follow for managing properties like this in this ecosystem.
For instance, I assume I would just store this properties file in "src/main/resources", use the maven-resources-plugin to filter property values, and load the file from the classpath.
I noticed that the original authors of this codebase didn't set up a "typical" Maven Java source code folder structure, they just created a source folder named "src", and both Java source files and properties files went into this tree. That seems lazy to me, but perhaps some convention or aspect of Tycho and Eclipse makes that a reasonable thing to do?
In the case of this application, these properties files are all used as ResourceBundles, and from inspecting the code, it does appear there are conventions for managing these (extending "NLS", for instance).
For the case I'm looking at, the properties I want to manage don't represent localizable messages, so they don't need to be managed as ResourceBundles, although I can see it's tempting to use the existing practice for loading these, which would mean putting them in a resource bundle.
Ironically, the number of properties I'm talking about is very small, perhaps 2-3.
Back to the top