How do you manage Hibernate zillion JAR files

For my previous employer, I worked with Hibernate, and now that I am in a small startup, I would like to use it again. However, loading both the Hibernate core and the Hibernate annotations is rather painful, as it requires combining many JAR files. Since JARs are divided into categories such as “required” and “optional”, I would suggest that each developer ends up with different contents of their lib folder.

What is the general way to solve this problem? Basically, I want to have a formal way to get all the JARs for Hibernate, so (theoretically) I get exactly the same if I need again for another project next month.

Edit: I know something about what Maven does, but I was wondering if there is another way to handle this.

+3
source share
5 answers

As Aaron already mentioned, Maven is an option.

If you want something more flexible, you can use Apache Ant with Ivy .

Ivy is a dependency resolution tool that works just like Maven, you just determine which libraries your project needs and it will shut down and download all the dependencies for you.

+4
source

This may not be a very important answer, but I really don't see any problems with Hibernate dependencies. Along with hibernate3.jaryou, you must:

  • 6 , , dom4j slf4j .
  • 1 javassist CGLIB
  • , 2 jar, Hibernate

, 10 , Hibernate. , commons, dom4j slf4j, , ​​ . , , , "", Maven.

+2
+1

Maven Ivy , . (pom.xml ivy.xml) , , . , , , . , ANT, Maven Ivy. , Maven, , . , .

+1
source

I assume that you are using the Hibernate APIs explicitly? Is it possible to use a standard API, say JPA, and let the J2EE container manage the implementation for you?

Otherwise, upgrade from Maven or Ivy, depending on your current build system.

0
source

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


All Articles