Hi Jörg,

thanx for the example. Now I undestand, what you mean. You have a static start 
scrpit, but you create the classpath dynamically in that startscript.

I think of that too, but I would preffer the opposite: A dynamically created 
script, that uses a static classpath. With a dynamic classpath, I have no 
controll, what jar files are actually loaded, when the script is executed. I 
want to determine the jars being loaded, during the build time of the assembly.

Whats best practise in this situation? What options do I have beside Jörgs?



-------- Original-Nachricht --------
> Datum: Tue, 21 Sep 2010 12:15 +0200
> Von: "Jörg Schaible" <[email protected]>
> An: [email protected]
> Betreff: Re: Re: write dependencies into file during assembly

> Hi,
> 
> Iron Eagle wrote:
> 
> > Hi,
> > 
> > that sounds interesting. Can please give me a short example how you
> > "assemble the classpath in the start script"?
> 
> 
> bash:
> 
> ============= %< =============
> # * Goto script root dir
> cd `dirname $0`/..
> APP_CP=
> # * Set class path
> for i in lib/*.jar; do
>       APP_CP=$APP_CP:$i
> done
> APP_CP="$APP_CP:config"
> ...
> ============= %< =============
> 
> 
> Windows batch:
> 
> ============= %< =============
> @REM * Goto script root dir
> cd /d %~dp0\..
> set APP_CP=
> @REM * Set class path
> for %%i in (lib\*.jar) do call :APP_CP_append %%i
> call :APP_CP_append "config"
> ...
> goto :EOF
> :APP_CP_append
>     set APP_CP=%APP_CP%;%1
>     goto :EOF
> ============= %< =============
> 
> Actually these snippets are part of some kind of templates that we provide
> as own dependencies to a project that should have a run script and adjust 
> (filter them) for the project itself, so we can keep stuff like the main 
> class to use in property files belonging to the current project.
> 
> - Jörg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

-- 
GMX.at - Österreichs FreeMail-Dienst mit über 2 Mio Mitgliedern
E-Mail, SMS & mehr! Kostenlos: http://portal.gmx.net/de/go/atfreemail

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to