commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <mdigg...@latte.harvard.edu>
Subject Re: [Jelly] Making jelly.bat a little smarter
Date Wed, 01 Jan 2003 23:18:39 GMT
The big issue I recently ran into which caused me to suggest the changes 
to the jelly.bat file involved the configuration of services like log4j 
on JVM initialization. I seem to have to place the following on the 
classpath prior to initializing forehead for log4j to configure properly 
through forehead.

A .bat file example (where log4j config file is in 
C:\xyz\conf\logconfig.xml):

@echo off

set CLASSPATH=C:\xyz\conf
set FOREHEAD_CONF=C:\xyz\conf\forehead.conf

set JELLY_OPTS=%JELLY_OPTS% -Dxyz.home=C:\xyz
set JELLY_OPTS=%JELLY_OPTS% 
-Dlog4j.configuratorClass=org.apache.log4j.xml.DOMConfigurator
set JELLY_OPTS=%JELLY_OPTS% -Dlog4j.configuration=logconfig.xml

call %JELLY_HOME%\bin\jelly model.xml

now I was hoping to get away with loading up the classpath in forehead 
like this in C:\xyz\conf\forehead.conf:

+ant.home
+jelly.home
+xyz.home
+tools.jar

=[root] org.apache.commons.jelly.Jelly

[root]
   ${xyz.home}/conf
   ${xyz.home}/classes
   ${xyz.home}/lib/*.jar
   ${jelly.home}/lib/*.jar
   ${ant.home}/lib/*.jar
   ${tools.jar}


but it appears something is wrong because log4j attempts to fire up and 
fails to locate the logconfig.xml file on the classpath. I'm not exactly 
sure why this happens when it appears that the log4j jar isn't placed on 
the classpath until the forhead.conf file has been processed.

I'll try it with classworlds and see if I get the same effect.

-Mark

bob mcwhirter wrote:
> Ideally, we need to move Jelly to use classworlds instead of forehead
> also. 
> 
> 	http://classworlds.werken.com/
> 
> Maven is making the move, as forehead was a only premature attempt to
> solve a larger problem.  classworlds solves the problem better, I believe.
> 
> Your same suggestion applies though, regarding supplying alternate
> launcher config files.
> 
> 	-bob
> 
> 
> 
> 
> On Fri, 27 Dec 2002, Mark R. Diggory wrote:
> 
> 
>>Making jelly.bat support alternate sources for forehead.conf would good 
>>as well. This allows for addition of jars to the classpath when its 
>>unfeasable to place them into the jelly/custom directory.
>>
>>
>>@echo off
>>
>>if "%FOREHEAD_CONF%"=="" set FOREHEAD_CONF=%JELLY_HOME%\bin\forehead.conf
>>
>>%JAVA_HOME%\bin\java -classpath 
>>%CLASSPATH%;%JELLY_HOME%\lib\forehead.jar 
>>-Dforehead.conf.file=%FOREHEAD_CONF% -Dant.home=%ANT_HOME% 
>>-Djelly.home=%JELLY_HOME% -Dtools.jar=%JAVA_HOME%\lib\tools.jar 
>>%JELLY_OPTS% com.werken.forehead.Forehead %*
>>
>>
>>----
>>Mark
>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>>
> 
> --
> Bob McWhirter        bob@werken.com
> The Werken Company   http://werken.com/
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message