ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: putting cmd args in ant.bat
Date Fri, 10 Jun 2005 10:10:17 GMT

Hi,

finally i got it, simply putting the line

set ANT_ARGS=-lib c:\ant_extralibs

into ant_installdir/bin/ant.bat


Gilbert
 

-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] 
Sent: Thursday, June 09, 2005 12:14 PM
To: Ant Users List
Subject: RE: putting cmd args in ant.bat

 
Hi, Jan

sorry didn't get it yet

i have no antrc_pre.bat / antrc_post.bat in my .../bin folder

the background of my question =

i'm kicking off an antscript out off Cruise Control.

Normally i start my scripts with a batchfile like that =

/*
@ echo off

set ANT_OPTS=-Xmx1024m
set ANT_HOME=C:\ant_1_6_5
set
PATH=%PATH%;C:\Programme\JavaSoft\JDK\j2sdk1.4.2_05\bin;%ANT_HOME%\bin;C
:\cvsnt;C:\was_libs
set JAVA_HOME=C:\Programme\JavaSoft\JDK\j2sdk1.4.2_05

: DEBUG
:call ant -debug -listener org.apache.tools.ant.XmlLogger -lib
c:\ant_extralibs -f  %1

: XML LOGGER
:call ant -listener org.apache.tools.ant.XmlLogger -lib c:\ant_extralibs
-f  %1

: DEFAULT
call ant -lib c:\ant_extralibs -f  %1

pause 
*/

but when using ant under the hood of CruiseControl i call
the ant_install_dir/bin/ant.bat with the filename of the antscript as
argument.

Now i want my extralibs to be available under CruiseControl also,
but i can't change the %PATH% at that machine.

If i understand your posting correctly i may not put the - lib ... to 
ANT_CMD_LINE_ARGS

but what's the most easiest way to achieve what i want ??

Thanks for your patience !!

Gilbert 



-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Thursday, June 09, 2005 11:57 AM
To: user@ant.apache.org
Subject: AW: putting cmd args in ant.bat

The call of the batch file antrc_pre.bat in your home directory is the
first
thing the Ant startup script does. antrc_post.bat is the last. So you
could do
some extra work there.

The environment variable ANT_OPTS is given as argument:
"%_JAVACMD%" 
    %ANT_OPTS% 
    -classpath "%ANT_HOME%\lib\ant-launcher.jar" 
    "-Dant.home=%ANT_HOME%" 
    org.apache.tools.ant.launch.Launcher 
    %ANT_ARGS% 
    %ANT_CMD_LINE_ARGS%
Oh - no "-lib" option possible. Only VM-Parameters.

But you can set the environment variable ANT_ARGS.


Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message