views:

40

answers:

2

Most people agree that it's a good practice to have copies of all libraries your project depends on in the /lib subfolder, so the project can be built on other computers without having to install the libraries (and you can keep the libraries in source control).

Is there a way in Eclipse to add the referenced libraries' files to the /lib folder automatically?

Copying and pasting files in package view doesn't seem to work for this (I get "Cannot paste the clipboard contents into the selected elements").

A: 

One way to get the library files in the /lib directory is to right click on the /lib directory folder and import the files. The import wizard will let you select the import source and individual files.

Gilbert Le Blanc
But I still need to find these files in the file system (or I am missing an import source for referenced libraries).
Alexey Romanov
The input source for files in the file system is General -> File System.
Gilbert Le Blanc
A: 

I strongly disagree about copying dependent libraries into /lib folder. It might be ok for a standalone small project, but when number of libraries grows and when there is more then one project depends on the same libraries you'll end up with lot of duplicated files in your project. Not to mention abuse of the version control system with all those large binary files. All in all it is better to use some dependency management tools, such as Ivy or Maven. The Eclipse plugins for both of those are making it practically seamless.

Eugene Kuleshov