Bug 166556 - Folder as classpath container for jars
Summary: Folder as classpath container for jars
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 enhancement with 20 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 208487 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-01 15:51 EST by Stephan Kleine CLA
Modified: 2022-01-03 09:33 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Kleine CLA 2006-12-01 15:51:07 EST
Hello,

I'm looking for a way to configure folders as dynamic library containers that provide the included jars to the classpath.

My search with google lead me to #39198, which is marked as a duplicate of #50461.  According to the posts for #50461 this functionality is already included in eclipse but I can't find it and received no answer upon my comment. Therefore I'm reposting this as a feature request.

So, I want to be able to do the following: mark a folder (inside a project or not - doesn't matter to me) as a container that dynamically adds or removes jars from the classpath of my project when I add them to or remove them from this folder (exactly like the 'Web App Library' folder from the Web Tools Project does).

Further this folder should be shown like a directory (again like the 'Web App
Library' container or the 'JRE System Library') so my 'Project Explorer' view
isn't drowned with jar entries and remains useful.

To put it short: I want a 'Web App Library' folder for 'normal' eclipse projects.

IMO this should be possible by 'Selecting Project Preferences' -> 'Java Build
Path' -> Libraries -> 'Add Library' -> __'Add Jar Folder'__ (currently one can only add a folder containing .class files).

Further there is probably not much work necessary because the functionality is already included in eclipse. Therefore nearly (I'm being optimistic here) all you have to do is to add a 'Add Jar Folder' button on the library configuration page.

This enhancement would not only ease the the integration with existing build / dependency resolution systems but also ease jar distribution for bigger development teams and generally make many peoples life easier so please give me that button / functionality ;).
Comment 1 Tina Meier CLA 2006-12-03 14:05:56 EST
I would love to see that feature too!

IMHO I can't understand why you introduced the 'Web App' Container but didn't give us the possibility to use a dynamic _jar_ container like this for 'normal' projects.

Please add it.
Comment 2 Markus Schlegel CLA 2007-03-13 04:05:44 EDT
This is my number 1 wish to the next Eclipse version!
Up to now, we wrap our library-folder into a user-library to achieve a similar functionality. But this comes with a number of other problems, especially since UserLibraries are buggy...
Comment 3 Dave Whittaker CLA 2007-04-18 14:49:54 EDT
This is near the top on my eclipse wishlist as well.  I'd love to be able to just create a lib folder in my non-wtp applications and have eclipse magically add its contents to the classpath.  I believe someone created a plugin like this several years ago, and the "user library" feature seems to have been meant to superceed it, but that only seems to allow the creation of static containers.  Any chance something like this is in the works?
Comment 4 Max Gilead CLA 2007-05-21 13:10:50 EDT
I agree this would be wonderful thing to have. Libraries are usually distributed as jars names library_name.0.1.2.jar. With current behavior I have to rename them to library_name.jar (thus removing the version number which I have to track separately in lib/README file -- do I have to mention it requires more work and is error prone?) or do some clicking and updating project files. With this feature all I'd have to do is removing old jar, putting new one and that would be it.
Comment 5 Tadashi Murakami CLA 2007-10-01 21:57:00 EDT
bug 39198, bug 50461, bug 166556

I published a new version of 'Library Folder ClasspathContainer'
with an agreement with the original author, Joris.
Library Folder ClasspathContainer marks a folder and adds all
jars and zips on the folder.
When a member of the jars or zips is removed, this plugin automatically
follows the changes.
I modified the original plugin for eclipse 3.2 and 3.3. Maybe available on 3.0 and 3.1.

Please visit and try it.
  http://libcontainer.sourceforge.net/updates/
Comment 6 Martin Aeschlimann CLA 2007-11-02 05:51:11 EDT
*** Bug 208487 has been marked as a duplicate of this bug. ***