Hey, this seems to be the day for intentional build breaking!
I've just committed changes to change the names and locations of hackystat
properties.
Motivation: in version 6, there were a couple of bogosities with the use of
hackystat.properties:
(1) when installing a distribution, people had to manually edit the hackystat.properties
file to include their site-specific info (i.e. location of tomcat, the administrator
account and password, etc.)
(2) when updating a distribution to a new version, people had to manually cut and paste
data from their old hackystat.properties to their new hackystat.properties. They
couldn't just copy their old hackystat.properties to the new location, because that would
overwrite the version and buildtime info.
The underlying cause of these problems was the fact that hackystat.properties combined
site-specific information with build-specific information.
To fix this, I've just changed Version 7 so that it requires the developer/administrator
to maintain two property files in two different locations:
1. <user.home>/.hackystat/hackystat.site.properties
This file contains "site" information, which generally doesn't change between
distributions. My hackysat.site.properties file contains:
tomcat.home=c:\\jakarta-tomcat-5.0.28
hackystat.data.dir=c:\\public_hackystat\\test
hackystat.host=http://localhost:8080/
hackystat.mail.server=mail.hawaii.edu
hackystat.site.name=Octavia
[EMAIL PROTECTED]
hackystat.disable.admin.email=true
hackystat.admin.userkey=asfdasdfasdf
hackystat.analysis.logging=true
#hackystat.timezone=GMT-10:00
tomcat.admin.user=hackyAdmin
tomcat.admin.password=asdfadsfa
2. <svn>/hackystat.build.properties
This file contains "build" specific information. In particular, this file contains the
<module>.available property definitions.
Note that _neither_ of these files contains the "hackystat.version" and
"hackystat.buildtime" properties. What happens now is that when the webapp is being
generated, a file called hackystat.version.properties is created in build/war/WEB-INF
that contains the version and buildtime properties.
Then, when the webapp is actually installed to the webserver (either in a hot or cold
deploy), a file called hackystat.server.properties is created in tomcat.home/conf which
contains the concatenation of:
hackystat.site.properties
hackystat.build.properties
hackystat.version.properties
And it is this file (hackystat.server.properties) that is read in by the server in
ServerProperties and used to communicate environment settings to the running webapp.
What's good about this new structure is the following:
- "site" info gets specified in one place and "build" info gets specified in
another.
- when updating a pre-built distribution, you will no longer have to manually edit the
hackystat.properties file (i.e. the new hackystat.build.properties file). Your "site"
settings are located in a separate place from your installation, and don't need to be
repeatedly cut and pasted each time.
- version and buildtime info is now automatically written into the WEB-INF directory at
webapp construction time, and does not appear in user-maintained property files (i.e.
hackystat.site.properties or hackystat.build.properties).