----- Original Message -----
From: "Jose Alberto Fernandez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 19, 2000 2:10 AM
Subject: RE: Apparent bug on ANT


> Stephan,
>
> I think I found what I think was the problem:
>
> If I say:
>    ant -Dtest clean
>
> It will execute the default target. If I say:
>    ant -Dtest=true clean
>
> it executes the clean target.
> I just wanted the variable to be defined, did not care for any especific
> since I can not test it anyway. 8-P
>
> Is this the expected behaviour? I would have thought that "test" should be
> defined as nothing (empty string) on the first case. I just tested it with
> the build file for ANT itself.
>

Expected and required (at least to be able to run on Windows). Windows the
behaviour to split arguments if they contain = or , if you call a
batch-file. The following batch-file

@echo off
:top
if "%1"=="" goto end
echo %1
shift
goto top
:end

results in:

C:\VAMOS50\SourceExt\test>test test test=bnga,aa=1
test
test
bnga
aa
1

So Ant could "see" you = if you use it to define a property and therefore
just uses the next argument if there is no =-sign in the argument to -D. One
could require users to specify all defines as "-Dprop=value" which will pass
the =, but that could lead to other problems I would guess?

Nico


Reply via email to