ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: repeating a target on a "fileset"?
Date Wed, 14 Feb 2001 22:03:40 GMT
----- Original Message -----
From: "Jason Pringle" <JasonP@captura.com>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, February 14, 2001 6:37 PM
Subject: repeating a target on a "fileset"?


> The problem is that there are almost 50 EJBs, and I don't want to create
50
> individual targets!  The "build-all-ejbs" cmd script basically does this:
>
> FOR /D %%i IN (%ejbpath%\*.*) do CALL %EJBCOMMAND% %FILES% %%~ni
>
> Is there some way to do the same thing in Ant?  Have some target that
could
> either build a single, designated EJB or build for every subdirectory?
>

One way would be to use

FOR /D %%i IN (%ejbpath%\*.*) do CALL ant -DmyEJB=%%~ni

which will define the property myEJB to the value formerly passed to your
%EJBCOMMAND%. Depending on the content of myEJB you should be able to use
this.

Nico




Mime
View raw message