Bug 139132 - Allow User Libraries per project
Summary: Allow User Libraries per project
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement with 9 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 270733 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-28 09:20 EDT by Aaron Digulla CLA
Modified: 2012-04-25 10:07 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Digulla CLA 2006-04-28 09:20:38 EDT
It should be possible to create a user library in a Java project as a file (just like the launch configurations).

This would allow to keep them under version control and share the correct version between members of a team.

Maybe you can put the project specific User Libraries in the .preferences folder so they don't clutter the normal project tree?
Comment 1 Mario L CLA 2008-07-15 06:09:09 EDT
Exactly, it would be quite useful for projects sharing (we don't really use workspace sharing) especially with the automatic build machine...
Comment 2 Max Rydahl Andersen CLA 2008-07-18 04:55:06 EDT
got my vote
Comment 3 Bron Eubanks CLA 2009-03-14 14:56:26 EDT
I would like to point out that a user library allows the exact contents of the library to be different from machine to machine.  Hence if two people store their libraries in different folders, a project-specific user library will actually break their configurations.  Individual JAR's on the build path will functionally accomplish what you are looking for, albeit without grouping the JAR's together.
Comment 4 Aaron Digulla CLA 2009-03-15 05:51:04 EDT
Well, I could group the JARs by putting them into a project, set them to "exported" and then add that project to my build path.

As for the "exact version", there are two solutions:

1. Always use the version number in the file name (i.e. "name-1.3.jar" instead of "name.jar")

2. Have Eclipse calculate a checksum of the library and add a warning to the project when the version doesn't match.
Comment 5 Bron Eubanks CLA 2009-03-15 21:40:26 EDT
I may have misunderstood the original intent of the bug.  If the purpose is to keep libraries under version control, you could keep your user library folder under version control, and have each developer build his user library against that checked out folder.

Disadvantage: If a jar version/name changes, then upon updating the folder that contains the JAR's of the user library, the developers will have to fix the user library.  At least eclipse will let you know about it...
Comment 6 Markus Keller CLA 2012-04-25 10:03:39 EDT
*** Bug 270733 has been marked as a duplicate of this bug. ***
Comment 7 Markus Keller CLA 2012-04-25 10:07:33 EDT
I don't think we should do anything here.

From bug 270733:
> Of course this can be emulated by substituting a Java project as a User
> library, but that is a bit of an overkill for this.

That's exactly the way to go. User libraries are meant for situations where each user has different library locations and the only thing that can be shared is the name of the library.

If you know the exact paths to the JARs / class folders, then the right solution is a library project that can be shared.