Adding jar file to each project multiple times

I have three projects(Admin,user,viewer) for each of them i added jar files in class path in eclipse. Now i have to use some of admin modules in user and some of admin and user modules in viewer(no cyclic dependency). But is there any way to add jars(which are common for each project at one place). I am packing project classes into jars can i pack the jars also in it?

Answers


There are several options how to do this:

  1. Create a "common base" project. Add all shared JARs to it and select all the JARs on the "Order & Export" tab in the "Java Build Path" editor. All this base project as a "Project" dependency to all other projects.

  2. Create a User Library

  3. Use Maven via the M2E plugin to manage you dependencies


Need Your Help

How to make an array of two strings dynamically

c++ arrays string

i have a problem,i should use this two strings in the code in an array,i dont know how to do it.

Having an async task finish after parent process is killed

c# asynchronous msbuild tfsbuild delete-file

I'm trying to delete a directory (3gb) after a TFSBuild finishes. I put the task in a try finally block so that it always executes. Problem is when a build is manually stopped, the task is killed i...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.