| Summary: | Support for directory based ant task libraries | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michal Ruzicka <michal.ruza> | ||||||||
| Component: | Ant | Assignee: | Jeff McAffer <jeffmcaffer> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | c_lalyre, darin.eclipse, jeffmcaffer, Michael_Rennie | ||||||||
| Version: | 3.6 | Keywords: | contributed | ||||||||
| Target Milestone: | 3.7 M4 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 327899 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Michal Ruzicka
Created attachment 180876 [details]
org.eclipse.ant.core-directory_based_ant_libraries.patch
A patch implementing the proposed functionality, including a small optimization of adding directly the bundle jar file to ant classpath in case the ant task library location happens to refer to the root ("/") of the bundle.
*** Bug 177756 has been marked as a duplicate of this bug. *** Currently the Ant core bundle's execution environment is J2SE-1.4. The patch introduces references to StringBuilder which are not allowed. Can you update the patch? Created attachment 181027 [details]
org.eclipse.ant.core-directory_based_ant_libraries_v2.patch
Updated version of the patch in which StringBuffer is used instead of StringBuilder.
*** Bug 329721 has been marked as a duplicate of this bug. *** Created attachment 182723 [details]
Alternative patch
Some comments on the current patch
- I'm not sure the File.SEPARATOR is the right thing to use in URI/URLs. Don't they just say "/" and don't care what filesystem you are on?
- isBundleRoot() is too complex. Here we can define the convention. Simply say if (library.equals("/")) then it is the root.
- Since we have to copies of the same moderately subtle code, move it all into getClasspathEntry
I'm attaching an alternative patch that should have the same effect.
Odd that marking as a dup does not bring over the "Blocks" bug numbers... (In reply to comment #7) > Odd that marking as a dup does not bring over the "Blocks" bug numbers... Patch looks good and all of our junit / smoke test pass. It would be way more awesome(r?) if the patch included unit tests for the new functionality. applied patch to HEAD, thanks Michal and Jeff. |