@echo off
:: ---------------------------------------------------------------------------
:: JOnAS: Java(TM) Open Application Server
:: Copyright (C) 2006,2007 Bull S.A.S.
:: Contact: jonas-team@objectweb.org
::
:: This library is free software; you can redistribute it and/or
:: modify it under the terms of the GNU Lesser General Public
:: License as published by the Free Software Foundation; either
:: version 2.1 of the License, or any later version.
::
:: This library is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
:: Lesser General Public License for more details.
::
:: You should have received a copy of the GNU Lesser General Public
:: License along with this library; if not, write to the Free Software
:: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
:: USA
::
:: Initial developer(s): Benoit Pelletier
:: Contributor(s):
:: ---------------------------------------------------------------------------
:: $Id: newjc.cmd 12606 2008-01-18 11:10:37Z pelletib $
:: ---------------------------------------------------------------------------
if [%JONAS_ROOT%]==[] goto setroot

pushd "%~dp0"
@set NEWJCDIR=%CD%
popd

set NEWJCDIR="%JONAS_ROOT%\\conf\\newjc"
set ANT_OPTS=%ANT_OPTS% -Djava.endorsed.dirs=%JONAS_ROOT%\lib\endorsed

if [%1]==[]   goto no_arg

Rem ---------------------------------------------
Rem Set the silence mode required
Rem ---------------------------------------------
:arg

if [%1]==[-auto]     goto auto_mode
goto end

:auto_mode

echo Mode Auto
ant -file %NEWJCDIR%\build-jc.xml -Dsilence.mode="true"

goto end

Rem ---------------------------------------------
Rem No arg, silence mode by default
Rem ---------------------------------------------

:no_arg

echo Mode Step by Step
ant -file %NEWJCDIR%\build-jc.xml -Dsilence.mode="false"

goto end

:setroot
echo JONAS_ROOT not set.
goto end

:end
