Library Management in Eclipse

When you clone an eclipse project from the repository, the project build path contains errors due to missing libraries. Therefore, each member of the team must search and place the banks of the library in the same place, so that when we clone the project, we have no problems. Or they must change the assembly order after each cloning operation.

What is the best practice to avoid this?

One approach is to put all banks in some network resource \\ xxx \ libraries and add banks from this network resource. But is this a better idea?

+4
source share
4 answers

In our project, we add the '.classpath' file to the repository. It contains a list of referenced libraries.

Libraries themselves are also checked in the repository, as well as in the "lib" folder.

We find this easier, so when someone adds libraries to the project, they check the ".classpath" and add the updated one.

+2
source

First use the version control tool. Secondly, in particular in Java Develop, you need a build system that processes the libraries that you use. One solution might be to use Maven, where you have a central location for your libraries (Maven Central) or a company storage manager.

+1
source

I use Maven to manage all the dependencies for my projects in Eclipse.

Thus, all libraries are automatically loaded by Maven, and you do not need to do manual work with lib folders, etc.

0
source

A better solution would be to use a build tool such as Maven, which can resolve your missing dependency libraries. However, if there are not many libraries in your project, you can leave them in the git repository and track them, I have several projects in which I have lib in the repository, and this is a convenient solution, because I can restore, for example, if will require an older version of the library. Therefore, the best way to manage your libraries depends on the situation, if you do not have many libraries, you can track them in the repository, otherwise it is better to use Maven.

0
source

Source: https://habr.com/ru/post/1401870/


All Articles