Bug 36332 - can't attach more than one source dir to a jar
Summary: can't attach more than one source dir to a jar
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-10 05:05 EDT by Brice Beard CLA
Modified: 2003-06-02 06:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brice Beard CLA 2003-04-10 05:05:37 EDT
A project can have several source dirs, but it seems impossible to attach more
than one to a jar file
Comment 1 Philipe Mulet CLA 2003-04-10 05:39:10 EDT
Good point, however if source folders are rooted in the same tree, then you may 
simply use this tree as the source attachment, and we should infer the proper 
rootpath from there.

src/
  src1/
  src2/

In theory, using 'src/' should suffice... can you give it a try ?
Comment 2 Olivier Thomann CLA 2003-04-10 14:12:33 EDT
I checked that if the source folders are rooted to the same tree (I use the
project folder as the root), one souce zip can contain all source files for the
binary jar.
Comment 3 Olivier Thomann CLA 2003-04-15 13:46:49 EDT
Philippe, do you plan any action to support multiple source dirs or actual
behavior is acceptable?
I believe this is good enough, because the project root can always be used to
support such a case. If a package is defined on more than one project, then I
guess it ends up split into two different jars which could be mapped to the
corresponding project root.
Ok to close?
Comment 4 Philipe Mulet CLA 2003-04-16 04:36:48 EDT
Multiple source attachments would require an API change. It would need to 
become critical in order to get more attention. Given there is a workaround, I 
am enclined to rather close this issue.
Comment 5 Brice Beard CLA 2003-04-16 05:12:42 EDT
Would this work with those settings:

	/src		<- goes in jar
	/stubs/Orbix        <- goes in jar
	/test/src                <- doesn't go in jar
	/functionnal_test/src         <- doesn't go in jar

is there a preformance issue ?
Comment 6 Olivier Thomann CLA 2003-04-16 08:23:27 EDT
You can give it a try.
According to your example:
	/src		<- goes in jar
	/stubs/Orbix        <- goes in jar
	/test/src                <- doesn't go in jar
	/functionnal_test/src         <- doesn't go in jar

Put the parent of all these folders as the source attachement. src and 
stubs/Orbix should be detected as root paths. You won't notice the performance. 
This code is quite fast. Only the first level of package fragments is tested. 
Let me know if you see a major performance issue, but I doubt it.
Comment 7 Olivier Thomann CLA 2003-04-23 13:08:57 EDT
Could you please confirm if your test case is properly handled? I don't see any
reason why it would not.
If this is the case, I will close this PR.
Thanks.
Comment 8 Olivier Thomann CLA 2003-05-21 16:43:46 EDT
Close as WORKSFORME.