bval-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: Question about BVal and Maven
Date Fri, 21 Jun 2013 15:42:31 GMT
Hi Brian,
  I have just updated the instructions and formatting on that page of the
site.  Thanks for bringing it to our attention.

The reason we declare the bean validation specification jars as "provided"
dependencies (such that they are not pulled transitively by Maven) is that
there are multiple jars available containing the API classes.  For some
JSRs (e.g. JSF) it is necessary to couple the API and implementation but in
the case of Bean Validation it  is possible for a given implementation to
function with any of multiple possible API jars (unified EL is another
example of a specification for which an implementation can, for the most
part, be API-provider-agnostic).  Also, in the case of Bean Validation, it
is completely kosher to have more than one *implementation* of the
specification available on the classpath--the API provides mechanisms to
select the implementation you want to use (and different active parts of
your codebase might even be using different implementations) but even in
this case you still, as usual, only want a single copy of the API classes
available on the classpath.  You might even be adding the Apache BVal
implementation to a container (e.g. JBoss, Glassfish) that already contains
the API published by the spec lead (Hibernate Validator) as well as their
reference implementation.  By the same token, however, you might someday
find yourself in the opposite situation:  adding Hibernate Validator to an
Apache TomEE instance (which would use the APIs provided by Geronimo and
ship BVal as the default Bean Validation implementation).  Our aim is to be
flexible for you.  I hope this helps to clear things up.

br,
Matt


On Fri, Jun 21, 2013 at 9:54 AM, Brian Stempin <brian.stempin@gmail.com>wrote:

> Hi, list!
>
> First and foremost: thanks for the awesome software.
>
> My questions are regarding inclusion of BVal in my project as a Maven
> dependency. =A0The instructions are a little bit unclear. I've included the
> bundle into my project, but it's not exactly clear what other dependencies
> I'm supposed to include. I see the line about needing
> org.apache.geronimo.specs geronimo-validation_1.0_spec 1.1, but that's for
> BVal 0.4. What do I need to include for BVal 0.5?
>
> My second question is: why do I need to include anything else manually?
> How come the APIs implemented by BVal don't come along as a dependency of
> BVal?
>
> Thanks for your help,
> Brian
>

Mime
View raw message