Does anyone have any best practices with respec to creating configuration files for Development / Testing / Deployment?
The problem is that the config files we have are relatively large and if we have different files for dev, test, and deploy then it gets to be a nightmare to manage those. If I add something to the dev config file then I need to update test and deployment configs too. And then the testing and deployment people need to merge their changes back with my additions.
It seems as though there should be some kind of conditional statement or the ability to import fragments. For example...
My problem is the TestStuff.hbm.xml should only be there for Unit testing and not production. Do I have to duplicate the ENTIRE file just to remove that one element ?Code:<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="mappingResources"> <list> <value>com/foo/platform/content/Content.hbm.xml</value> <value>com/foo/platform/rating/Rating.hbm.xml</value> <value>com/foo/platform/tracking/Tracking.hbm.xml</value> <value>com/foo/platform/services/filestore/local/FileInfo.Hbm.xml</value> <value>com/foo/platform/security/beans/Role.hbm.xml</value> <value>com/foo/platform/security/beans/User.hbm.xml</value> <value>test/com/foo/platform/rating/examples/TestStuff.hbm.xml</value> </list> </property> ...


Reply With Quote