From: Vladimir G. <vla...@du...> - 2009-12-17 14:01:05
|
I should specify that the parameters I do care about are the likes of database URL, username, password, mesquite installation folder. (See https://sourceforge.net/apps/mediawiki/treebase/index.php?title=JdbcProperties for the rest, which I agree could be ok to hardwire into a build.) I think it would be highly unreasonable that a sysadmin would need to ask the developers to make a new build any time he changes the DB password (or that the developers should even know the password for the production DB server!) --Vladimir On Dec 16, 2009, at 6:44 PM, Hilmar Lapp wrote: > > On Dec 16, 2009, at 1:39 PM, Vladimir Gapeyev wrote: > >> move whatever settings are currently specified in treebase-core/src/ >> main/resources/ >> jdbc.properties out of the WAR file and into tomcat configuration. > > > Ideally the .war file is actually as self-contained as possible, > i.e., contains as much configuration as it can. > > Keep in mind that normally, only a system administrator can change > the application server configuration, whereas a deployable is under > the control of the developers. Also, looking toward the future, it > is possible that a mirror site doesn't have any signifiant sysadmin > support, or their sysadmin support may be reluctant to change the > configuration of their application server. > > So normally the way this is done is that the deployment descriptor > or configuration file that holds the necessarily machine-specific > configuration is created fresh each time from a template when > the .war (or whatever deployable) is built, and packaged along with > it. This can be easily written as an ant task, and in fact we do > this for several projects at NESCent (Vladimir, you can ask Xianhua > to show you examples). There are ant tasks for replacing placeholder > variables with actual values that can be specified on the ant > command line or in a properties file. I would assume that maven can > do the exact same thing, if not better. > > That said, if that complicates things too much for now, let's table > that for after release, and hard-configure tomcat. > > -hilmar > > -- > =========================================================== > : Hilmar Lapp -:- Durham, NC -:- informatics.nescent.org : > =========================================================== > > > |