bval-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Stempin <>
Subject Re: Question about BVal and Maven
Date Fri, 21 Jun 2013 16:33:57 GMT
Hi Matt,
That update really helps -- thanks!

I didn't realize that there were so many APIs that could be plugged in.  In
my case, I ended up just using JSR 349.  Is there any way that a list of
the more common/popular APIs can be listed in that instruction page?  It
would also be nice if it said why I'd use a certain API over the other.
 For instance, I'm not sure why I'd want to use the suggested geronimo
package over JSR349 (or any other API for that matter).

Thanks for being awesome,

On Fri, Jun 21, 2013 at 11:42 AM, Matt Benson <> wrote:

> 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 <>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

View raw message