Bug 265960 - Request for Ant task to account for linked source folders
Summary: Request for Ant task to account for linked source folders
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2009-02-24 09:38 EST by Andrew Mak CLA
Modified: 2019-09-06 15:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mak CLA 2009-02-24 09:38:53 EST
I'm opening this request on behalf of customer of an adopter product.

The request is to have an Ant task that will generate a jar file but take into consideration linked source folders.  Currently, the Apache <jar> task only handles one source directory.
Comment 1 Andrew Mak CLA 2009-03-09 13:46:13 EDT
Hi, is there any status on this request?
Comment 2 Michael Rennie CLA 2009-03-09 15:39:32 EDT
No work has been allocated for this request. 

Could they not just use fileset or dirset and copy what they need to one dir then Jar it? 
Comment 3 Gerald Rosenberg CLA 2010-07-07 02:23:02 EDT
The basic problem is that the Ant task does not understand Eclipse linked folders, probably because they are entirely virtual.

A number of Ant task specifications are built into the Eclipse platform.  For example, the various Export operations all delegate to built-in Ant tasks.  Consequently, there is no practical way to implement a work around.  

When, for example, exporting a jar, fragment, or feature where the underlying project includes a linked folder (in this case the "src" folder), the export will fail with 

D:\EclipseWorkSpace35\net.certiv.specdsl\build.xml:190: srcdir "D:\EclipseWorkSpace35\net.certiv.specdsl\src" does not exist!
	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:871)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)

While it may be possible to completely recreate a jar export ant task, re-engineering the feature export is not practical.

Is there agreement that this is a bug that should be fixed?  
Is it even possible for the Ant task to recognize the presence of an Eclipse linked folder?
Comment 4 Eclipse Webmaster CLA 2019-09-06 15:29:59 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.