maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: Re: write dependencies into file during assembly
Date Thu, 01 Jan 1970 00:00:00 GMT
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message