|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Accessing "components" of fileset refid?*SUMMARY: Is there any Ant interface to the "components" of a fileset
reference?* Consider this Ant snippet: <fileset id="my_files" dir="${top_dir}"> <include name="${include_stuff_1}" /> <include name="${include_stuff_2}" /> <include name="${include_stuff_3}" /> <exclude name="${exclude_pattern}" /> </fileset> The "my_files" reference should encompass all the state of the fileset to which it refers. As such, I should be able to get properties of the fileset. Possibly like this: ${refid:my_files.dir} Does such an interface exist? And yes, I do have a reason for wanting this support. Our build system provides a general infrastructure which all projects share, by <import/>'ing a common Ant library. In one case a fileset is assembled in the common layer and "returned" to a users's build.xml through a known fileset reference. Ideally, the fileset reference would be the only interface between the "user" and "common" layers. But, unfortunately, some operations which want to use the fileset refid must also know the fileset base directory, which I think, should be available since it is an attribute of the fileset. I'd appreciate comments from the Ant experts. Thanks. --Cyril |
|
|
Re: Accessing "components" of fileset refid?You can always take a reference to filelists and turn them into a property:
<property name="my_files.prop" refid="my_files"/> <echo message="List of my_files: ${my_files.prop}"/> This will put the names of all files in the fileset into that property. Is that what you're looking for? On Wed, Jul 1, 2009 at 4:45 PM, Cyril Sagan<cyril.sagan@...> wrote: > *SUMMARY: Is there any Ant interface to the "components" of a fileset > reference?* > > Consider this Ant snippet: > > <fileset id="my_files" dir="${top_dir}"> > <include name="${include_stuff_1}" /> > <include name="${include_stuff_2}" /> > <include name="${include_stuff_3}" /> > <exclude name="${exclude_pattern}" /> > </fileset> > > The "my_files" reference should encompass all the state of the fileset to > which it refers. As such, I should be able to get properties of the > fileset. Possibly like this: ${refid:my_files.dir} > > Does such an interface exist? > > And yes, I do have a reason for wanting this support. Our build system > provides a general infrastructure which all projects share, by <import/>'ing > a common Ant library. In one case a fileset is assembled in the common > layer and "returned" to a users's build.xml through a known fileset > reference. Ideally, the fileset reference would be the only interface > between the "user" and "common" layers. But, unfortunately, some operations > which want to use the fileset refid must also know the fileset base > directory, which I think, should be available since it is an attribute of > the fileset. > > I'd appreciate comments from the Ant experts. > > Thanks. > > --Cyril > -- David Weintraub qazwart@... --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free embeddable forum powered by Nabble | Forum Help |