I want to add some configs to the classpath (generated by maven-jar-plugin), but I don’t want them inside a jar, but in an external folder. That way I’ll be able to edit configs without repackaging.
I found one solution How to add a classpath entry when executing the app with exec plugin but is there a less complicated solution?
Or maybe I’m wrong and it’s a bad pattern – storing configs in the classpath but outside a Jar? Maybe it’s better to store app configs in the user’s home directory and add them to the app at runtime?
For example I want to allow the end user to edit log4j.properties and translations.
Regards,
I’d suggest having a default location that it looks for the app configs (e.g. user home directory, as you suggested), but allow the user to provide an agrument/System property to override this location. Assuming to look on the classpath is not, in my opinion, the best solution, since the concept of a classpath is a fairly alien thing to most users, and can even be hard to determine for some programmers.