To load environment specific values, in my src/main/resources folder, I have some properties files in different subfolders i.e.
I am loading these properties through spring
ENVIRONMENT is environment variable.
I am using appassembler-maven-plugin to generate the executable .sh file.
As a result of this all my properties files become part of my generated jar file. I want to expose some of the properties to set their values at deployment time. I have tried following configuration
But Spring does not load the properties; may be due to the given path in spring config(see above) ?
What maven configuration should I use to move my properties files in appassembler\conf folder at package time and have spring load them from classpath. I am after the configuration that works for both development(in eclipse, unit tests as maven builds) and in deployment
"Know where to find the solution and how to use it - that's the secret of success."
Your first step is to verify that the classpath is being set as you expected, and that the properties files are in the conf directory. Also, you do know that the properties files need the full package/path name, right? In other words, you should see, for example "conf/com/app/ws/webservices-dev.properties".
Just a guess, by I think that the <configurationSourceDirectory> should be just src/main/resources, otherwise you will loose the package/path name on the files.