Chenya Zhang
Chenya Zhang

Reputation: 463

Hibernate Validator: Must I use Maven?

From hibernate.org: http://hibernate.org/validator/documentation/getting-started/ I saw Prerequisites: Java Runtime >= 6, Apache Maven

However, "maven" is not even mentioned in the following: http://www.aviyehuda.com/blog/2010/04/14/using-hibernate-validator-to-cover-your-validation-needs/

Our current project is not maven-based, a student project. Could we still use hibernate validator without using maven? Or is there any better choice for hibernate validation?

Upvotes: 0

Views: 515

Answers (3)

Vy Do
Vy Do

Reputation: 52626

You can download from:

https://repo1.maven.org/maven2/org/hibernate/hibernate-validator/5.2.4.Final/hibernate-validator-5.2.4.Final.jar

Then add this file jar to your project manually. As you seen, downloading jar file is an alternative way when not using Maven.

Upvotes: 0

Rocherlee
Rocherlee

Reputation: 2791

Maven is optional. But it's a very helpful tool for building Java projects (via many phases like compile, test, package, install...). You'd better learn to use it.

In your question, the hibernate-validator jar will depend on other jars such as hibernate-jpa, validation-api, joda-time... It means you can not run your project with only hibernate-validator jar file. You need to collect all the required jars together.

Maven will automatically resolve it for you.

Upvotes: 0

Henry Dang
Henry Dang

Reputation: 106

Maven is not required. The main reason you want to use Maven is that it makes downloading all the package dependencies super easy.

If it's just a small student project, and you don't want to use Maven, then just download the jars that you would otherwise have downloaded with Maven.

You can manually download the jar files here : http://hibernate.org/orm/downloads/

Upvotes: 1

Related Questions