|
From: Pauwels S. <Ste...@si...> - 2003-04-04 05:44:07
|
Hi, Thanks for your fast response, This is exactly the problem I have. I gave the example with CLASSPATH vars, but actually I will use this feature for other variables to. This feature is easy to maintain a lot of setting of my application in just one file which runs as a service on Windows and as a daemon on Solaris. At this moment (version 2.2.5), I replace every env var in the conf files with the env vars defined in one general file. But it is a lot of extra work. Thanks again, and I hope the fixed release 3.0.2 comes out soon. regards, Stefan ---------------------------------------------------------------------------- ------------------- Stefan, Well there is a good reason why you can't get this to work. You found a bug. :-/ This actually has nothing to do with the use of cascading configuration files. I was setting new environment variables before doing any expansion of their values so in this case, JARS variable was being set to the value "%JAR1%;%JAR2%" rather than "test1.jar;test2.jar". Was this the problem that you were seeing? I have committed a fix to CVS and this will be in the 3.0.2 release. I am waiting for other users to test a couple other fixes, but it should be released soon. For now, you will need to avoid setting environment variables which reference other variables themselves. Change to the following: set.JAR1=test1.jar set.JAR2=test2.jar set.JARS=test1.jar;test2.jar As a side note, though while building up a classpath like this will technically work on windows platforms, the resulting config files will not be platform dependent. A better solution would be to actually set the wrapper.java.classpath properties in the include file. Set common values first in the main class and then include other values in your cascading include file. wrapper.conf: --- wrapper.java.classpath.1=../lib/wrapper.jar wrapper.java.classpath.2=../lib/common.jar wrapper.java.classpath.3=../lib/default.jar #include myconf.conf --- myconf.conf: --- wrapper.java.classpath.3=../lib/alt.jar --- The 3rd classpath element would then be overridden if the myconf.conf file exists. Thanks for finding this. Cheers, Leif Pauwels Stefan wrote: >Hello, > >I want to use the cascading of configuration files. >But there's is something that did not work: > >If I put in my vonfig file this: > >... ># include ../conf/myconf > >... > >wrapper.java.classpath.1=%JARS% > >... > >And in my cascaded conf file (myconf): >set.JAR1=test1.jar >set.JAR2=test2.jar >set.JARS=%JAR1%;%JAR2% >... > > >This won't work. >Can someone help me please, > >Kind regards, > > Stefan Pauwels > E-mail: * Stefan.Pauwels@si... > > |