I have a simple spring mvc app, using maven with intellij.
How do you go about creating seperate files for both production and development?
e.g. say I want to set a production and development mysql connection string for nhibernate?
How can I have it such that when I build it will take the correct file to use to grab configuration information? (and any advice on naming conventions for the files?)
Using an ant task is pretty straight forward for this.
First, create a couple profiles under
<project>in yourpom:Then use the
maven-antrun-pluginNow you just specify the profile you want when you run
mvn. If you want a default, uncomment and place the:section in the profile you want by default. As it is, the build will fail on the ant task if neither is specified.