From: Steve Loughran <steve_loughran@hp...> - 2004-07-26 12:09:52
Ritu and I have been dealing with the problem of how to include
user-specific customisations into
daemons deployed during testing.
The current case of this is how to configure the runtime to locate
jetty, but there are clearly other examples -anywhere where we need to
let individual developers point the daemons at part of the system.
Support for such overrides is inherent with the PROPERTY and LAZY
PROPERTY attributes of the language, but we still need to set up the
jvms with customised properties.
We support customisation within ant by having support for an optional
core/build.properties file that overrides ant properties for a build.
I'd like to do something similar with the daemon. Here is the proposal
1. we have an (optional) file in the core directory called daemon.properties
2. this file is (optionally) loaded when we come to deploy.
3. Everywhere that we start a daemon or deploy, we load in this common
4. Everyone who hard codes paths into their test/demo scripts stops it
and uses this option.
One other point to note is the cross platform problem: you cannot have
use normal string operations to create and manipulate portable file
paths, which makes it very hard to do cross-platform deployment
descriptors. There is a File component in services/OS that can be set up
with a file, and which adds the attribute absolutePath to itself on
deployment...this path is platform specific, even if the directories and
files used as parameters, are written with forward or backward slashes.
To get (3) working I will have to extend the ant tasks; there isnt
something built in to ant that meets our needs, either. Its a pretty
simple addition; expect it later today.