You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bernard LUPIN <be...@yahoo.fr> on 2006/12/04 17:22:12 UTC
RE : AW: how to retrieve ant command line arguments on LINUX
Thank you for this advice. Unfortunately, the
ant_exec_args is not exported, so it does not appear
in the environment properties.
I've made a diff beetween the output of
<echoproperties/> using "ant" and "ant -verbose". With
this way, I've found the ANT_CMD_LINE_ARGS under
windows. But under linux, there are no additional
properties...
Perhaps another way ?
Regards,
Bernard
--- Jan.Materne@rzf.fin-nrw.de a écrit :
> On Windows the ANT_CMD_LINE_ARGS environment
> variable is set by the launcher script bin\ant.bat.
> So the equivalent would be found in the unix
> launcher: bin/ant
>
> bin/ant:0024: for arg in "$@" ; do
> bin/ant:0031: elif [ my"$arg" = my"--h" -o
> my"$arg" = my"--help" ] ; then
> bin/ant:0032: show_help=true
> bin/ant:0033: ant_exec_args="$ant_exec_args -h"
> bin/ant:0034: else
> bin/ant:0035: if [ my"$arg" = my"-h" -o
> my"$arg" = my"-help" ] ; then
> bin/ant:0036: show_help=true
> bin/ant:0037: fi
> bin/ant:0038: ant_exec_args="$ant_exec_args
> \"$arg\""
> bin/ant:0039: fi
> bin/ant:0040: done
> bin/ant:0322: ant_exec_command="exec \"$JAVACMD\"
> $ANT_OPTS -classpath \"$LOCALCLASSPATH\"
> -Dant.home=\"$ANT_HOME\"
> -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts
> org.apache.tools.ant.launch.Launcher
> $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
> bin/ant:0323: if $ant_exec_debug ; then
> bin/ant:0324: echo $ant_exec_command
> bin/ant:0325: fi
> bin/ant:0326: eval $ant_exec_command
>
>
> So try "ant_exec_command".
> I havent Linux, so let us know ;-)
>
>
> Jan
>
>
>
> >-----Ursprüngliche Nachricht-----
> >Von: Bernard LUPIN [mailto:beal6226@yahoo.fr]
> >Gesendet: Montag, 4. Dezember 2006 16:44
> >An: user@ant.apache.org
> >Betreff: how to retrieve ant command line arguments
> on LINUX
> >
> >Hi all,
> >Is it possible to retrieve the ant command line
> arguments
> >(like -verbose, -quiet, ...) within an ant task ?
> >On windows platforms, I've found that
> >env.ANT_CMD_LINE_ARGS contains all the ant
> arguments, so I can
> >parse them with the contrib's propertyregex task.
> >But this don't work on my Linux platform, since
> >ANT_CMD_LINE_ARGS seems to be not set.
> >Thanks a lot !
> >Bernard
> >
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org