|
From: Leif M. <le...@ta...> - 2003-03-11 01:37:50
|
I am not sure I am grasping what it is you want to do. At what point do
you want the
replacements to happen? At run time? If so, what is the difference
between what you
are asking for and an environment variable?
If you are talking about at build time, then you can easily do the
replacements as part
of the ant build. Simply use the syntax "@java.home@" and then apply
filters to the file
when you copy it. I usually have a src/conf/wrapper.conf.in file which I
use as a source
for this purpose.
As for the exact case of your classpath, the Wrapper will expand wild
cards at run time
so you should not have to list up every single jar in the wrapper.conf
file. Do something
like this:
wrapper.java.classpath.1=c:/myapp/lib/*.jar
That still has a fixed path however, to clean things up further, try
using relative paths.
Assuming that the wrapper.exe is located in a c:/myapp/bin directory,
the above can
be changed to:
wrapper.java.classpath.1=../lib/*.jar
This will now work at install location, and on any platform.
Let me know if I missed what you were asking for.
Cheers,
Leif
Mike Castle wrote:
>Ala ant, would it be possible to support arbitrary properties in the .conf
>files. For example:
>
>java.home=C:\path\to\jre
>wrapper.java.command=${java.home}/bin/java.exe
>
>The reason is, I'd like to be able to parameterize some things quite
>easily in the config file with OUT having to use environment variables,
>because I may have multiple installations of the same app, with different
>application level config files, but I'd like to have to not modifiy
>the wrapper .conf files any more than necessary. In my case, I have
>something like 25 jars in the classpath. And I'd like to make the top
>level directories a parameter that I can edit on one line, rather than
>having to use search/replace in an editor to change all 25.
>
>Is this scheme possible in a future version?
>
>I've not yet looked at the code myself to see if I could add it easily
>enough, figure I'd ask the expert first. ;->
>
>mrc
>
>
|