[Yanel-dev] new build property "local.config.home" supplementing
"local.config.dir"
Guillaume Déflache
guillaume.deflache at wyona.com
Thu Apr 9 12:47:13 CEST 2009
Michael Wechner schrieb:
> Guillaume Déflache schrieb:
>> This property allows to store all the local Yanel configuration in a
>> directory *not relative" to $YANEL_HOME/conf/ (see
>> http://svn.wyona.org/repos/public/yanel/trunk/src/build/build.properties
>> for more info).
>
> thanks very much, whereas to be honest I don't fully understand how this
> works
It is probably probably because you are expecting something more
complicated than it is! ;)
So 1st an example for Hudson:
$ ls /opt/hudson/hudson-1.XXX/home/jobs/PROJECT/yanel-configuration:
local.log4j.properties local.realms.xml local.resource-types.xml
[local.yanel.xml is not really customizable ATM so we leave it out here]
$ grep 'local.config.home'
/opt/hudson/hudson-1.XXX/home/jobs/PROJECT/workspace/yanel-trunk.working-copy/src/build/local.build.properties
local.config.home=/opt/hudson/hudson-1.XXX/home/jobs/PROJECT/yanel-configuration
...or maybe for Hudson you would even want to use ./build.sh
-Dlocal.config.home=/opt/hudson/hudson-1.XXX/home/jobs/PROJECT/yanel-configuration
to avoid having to keep a safe master copy a local.build.properties
> # Dir name of local configuration
> local.config.dir=conf/local
>
> # Full path of local configuration (NOTE: defining it will override any
> local.config.dir setting.)
> #local.config.home=/path/to/project/yanel-configuration
>
>
> Is yanel-configuration a directory? And if so, what does it contain (for
> example yanel.xml or realms.xml)? And if so, does it mean that files
> like yanel.xml are not
> loaded from the classpath anymore? And if so, where within the web-app
> is this path set?
Yes, it is a directory ("*.home" properties usually are! ;) ) It should
contain all that conf/local can contain, e.g. local.yanel.xml and
local.realms.xml. And no, yanel.xml and friends are still loaded from
the classpath at runtime; this simple modification is only a build-time
thing.
> Thanks
>
> Michi
>> (Fortunately entropy did not grow too much since I also removed a
>> similar but yet unused property there! ;) )
>> This helps a bit for Hudson projects where it can then be stored out
>> of the workspace, thus avoiding a complete wipeout on failed svn updates.
>>
>> Originally I wanted to support relative paths in Yanel conffiles to
>> make it mostly configuration-independant, but it proved much harder
>> than expected (some refactoring of the build process of the resources
>> and realms would be needed, and Michi is also doing some ATM, so I'd
>> better wait).
>> Anyway I'll try to get there slowly on my free time eventually...
As said, the relative path support will have to wait, and then it still
wouldn't change runtime behavior, it would still be a build-system trick
to make build-time look more like runtime, which is what we should
strive for in general IMHO.
More information about the Yanel-development
mailing list