ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Deragon <>
Subject Re: Cannot get exclude attribute to work in a dirset.
Date Sat, 28 Aug 2004 16:39:48 GMT
Bill Rich wrote:
> Try something like this to see what is in the dirset then you can tinker
> around with it until you get what you want.
> <path id="apath">
>   <dirset dir="${env.ANT_HOME}">
>     <include name="**/**"/>
>   </dirset>
> </path>
> <pathconvert refid="apath" property="ap" targetos="windows"/>
> <echo message="A path is [${ap}]"/>
> Bill Rich
> Wilandra Consulting LLC

Thanks for the tip.  The printed path is ok, i.e. does not contains any .old
directory, yet javac still goes into a .old directory:

[javac] StockDB.old/ added as
StockDB.old/CieShareBrowser.class doesn't exist.

Here is what I tried.

  <path id="srcpath">
    <dirset dir="/data/devel/java">
      <exclude name="**/*old*/**"/>
      <exclude name="**/*obs*/**"/>
      <exclude name="**/*org*/**"/>
  <pathconvert refid="srcpath" property="srcpathprop" targetos="unix"/>
  <echo message="srcpath is [${srcpathprop}]"/>
  <javac debug="on" verbose="on" destdir="${build}">
    <src refid="srcpath"/>

The output looks like:

[echo] srcpath is

Could it be that because /data/devel/java is included, javac recursively goes
through that directory ignoring the exclusions?

Best regards,
Hans Deragon
Consultant en informatique/Software Consultant
Deragon Informatique inc.     Open source: (Promotion du libre)
mailto:// (Logiciel)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message