ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gordon" <>
Subject How do I get at the project base dir inside a subclass of BaseExtendSelector?
Date Mon, 31 Mar 2003 17:40:16 GMT

I'm passing <param name="somedir" value="${}">
parameter into a custom selector, which is a subclass of BaseExtendSelector.
${} is defined relative to the project ${basedir}, so
inside my code I'll get a string value for the "somedir" parameter which is
basically useless to me unless I can do

new File(project.getBasedir(), somedir);

However, setProject() never seems to get called on my custom selector, even
though it's a ProjectComponent. Is this a bug in ANT BaseExtendSelector or
AbstractFileSet, not setting the project on the component?

I can acheive the effect I'm after by passing in <param name="somedir"
value="${basedir}/${}"> - do I have to live with
that? I'd rather pass in paths defined relative to the project basedir,
which is consistent with passing around directories in the rest of ANT.

Tim Gordon

Allustra Limited
1 Royal Exchange Avenue
Tel 020 7464 4190
Tel 020 7464 4194

View raw message