Bug 37763 - [PATCH] Support for <rootfileset>s with dir attr value different from that of parent <classfileset>
Summary: [PATCH] Support for <rootfileset>s with dir attr value different from that of...
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.6.5
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2005-12-02 22:38 UTC by Alexei Yudichev
Modified: 2010-11-14 22:14 UTC (History)
0 users



Attachments
ClassfileSet diff (1.00 KB, patch)
2005-12-02 22:39 UTC, Alexei Yudichev
Details | Diff
DependScanner diff (1.15 KB, patch)
2005-12-02 22:40 UTC, Alexei Yudichev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Yudichev 2005-12-02 22:38:37 UTC
A major drawback of <classfileset> is that nested <rootfileset>s are limited to 
have base dir same as base dir of a containing <classfilset>. The suggested 
simple patch solves this problem. DependSet is modified to hold a collection of 
additionalBaseDirs which is populated from all the <rootfilesets>. This 
collection is then used to add classpaths to DependencyAnalyzer.
Comment 1 Alexei Yudichev 2005-12-02 22:39:45 UTC
Created attachment 17125 [details]
ClassfileSet diff
Comment 2 Alexei Yudichev 2005-12-02 22:40:04 UTC
Created attachment 17126 [details]
DependScanner diff
Comment 3 Matt Benson 2005-12-30 19:10:30 UTC
This looks reasonable.  It would look more reasonable, however, with a testcase
(i.e. I would commit it if it had one).  ;)
Comment 4 Stefan Bodewig 2009-08-27 00:53:04 UTC
svn revision 808310
Comment 5 Dieter Krachtus 2010-11-14 19:45:30 UTC
I downloaded the latest version of ANT with the fix (I checked in the sources) but it still does not work if I use several directories via rootfileset.

		<classfileset id="reqdClasses" dir="_temp_ptp_2" rootclass="main.MainClass">
			<rootfileset dir="_temp_ptp_1" />
			<rootfileset dir="_temp_ptp_2" />
		</classfileset>

Do I use the syntax incorrectly? Sadly there is no working example in the testcases.
Comment 6 Dieter Krachtus 2010-11-14 22:14:16 UTC
It seems classes in additional rootfileset(s) are simply added to the classfileset. I hoped the rootfileset(s) would extend the 'classpath' where classfileset searches for dependent classes and adds classes only if they are dependent to the rootclass.

This feature makes a lot of sense.