Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAR file folder for eclipse projects

I'm trying to create a centralized folder (in some kind of a "meta project" in my eclipse workspace) for commonly used JAR files for referenced projects in this workspace. It should work similar to the WEB-INF/lib folder for web projects but also apply to non web projects, and automatically scan and add all jar files in this folder.

I tried to create a user library with these jar files and reference them in the project but I still have to add every new jar manually to the user library (and don't know if it is referenced relative of absoulute) and Tomcat (WTP) doesn't seem to take these files (Run As -> Run on Server) into its classpath (and I don't want to duplicate the jars and put them into WEB-INF/lib). Any ideas?

like image 578
Daff Avatar asked Jul 28 '09 13:07

Daff


1 Answers

+1 for Ivy.

If you'd rather do it in a separated project in Eclipse:

You added the 'common project' as on dependency for other projects (Java Build Path->Projects, then Add). But, have you exported the jars of the 'common project'? (In the common project: Java Build Path->Order and Export, then check all jars).

like image 144
fg. Avatar answered Sep 21 '22 17:09

fg.