ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Fernandez <>
Subject adding filters to a filterset
Date Thu, 10 Apr 2008 03:10:17 GMT

I'm hoping someone can tell me if this is possible.  I'm beginning to think that since there
is no set method in Project that this simply is not possible.

I define a filterset in a target and then call a custom task to which I pass the refid of
the filterset.

      <filterset id="configobj.filterset" >
          <filter token="" value="" />

      <mytask filteretrefid="configobj.filterset" />

In the task I can then see the filters in the filterset

            Reference r = new Reference(getProject(), filtersetrefid);
            f = (FilterSet) r.getReferencedObject();
            String allfilters = f.getFilterHash().toString();
            Logger.log( Project.MSG_VERBOSE, this, "filterhash toString():" + allfilters );

I then use f.addFilter to add filter elements to the filterset and I can print these in the

[GetObjectProperties] filterhash toString():{oma.folder.products.path=/Products, oma.person.demo.login.userid=hpusrv001\sasdemo,}

However, upon returning from the task to the calling target, the filterset seems to only have
the original filter element that was added in the filterset task.

Does anyone know if I can accomplish adding filter elements to a filterset in this manner?
Or can I create a new filterset in my task, give it a refid and then use that refid back in
my target?


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

View raw message