Bug 45262 - Request viewpathing support for Ant
Summary: Request viewpathing support for Ant
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 16:57 UTC by Henning Vahlenkamp
Modified: 2008-06-25 08:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Vahlenkamp 2008-06-23 16:57:28 UTC
Could Ant be enhanced to support a viewpath? 

For example if VPATH=/NodeA:/NodeB:/NodeC and a developer's current working directory is under /NodeA, viewpathing would mean all files required by the build.xml would not have to exist under /NodeA. Such files could be in /NodeB or /NodeC as well. Each node of the viewpath would be checked from left to right for each required file, and the first found instance of the file would be used. 

The advantage of viewpathing is that the developer doesn't have to maintain a full set of the project source in their node, rather only those source files that changed. All other source could be in a shared area or an "official" build environment. This can facilitate collaboration among multiple developers on large applications.

The viewpathing feature described above exists in Alcatel-Lucent (and AT&T) nmake for various UNIX platforms and is quite useful. It would be great to have it in Ant as well.

Thank you.

Henning Vahlenkamp
Comment 1 Matt Benson 2008-06-25 08:10:03 UTC
It seems like the least-intrusive way to do this would be to build it as a special resource collection, simply a preference-based fileset.  vfileset maybe?  It might look like:

<vfileset includes="**/*.java">
  <basepath>
    <file file="${local.srcdir}" />
    <file file="${shared.srcdir}" />
  </basepath>
</vfileset>

vfileset would also support a basepathref attribute, the excludes|defaultexcludes|casesensitive|followsymlinks attributes, and the include|exclude|includefile|excludefile nested elements.

My only concern is that this might be too specific a use-case to live in Ant core.  Opinions from other devs?