1

Iam working on validations using Apache bval.Looks like apache bval is dependent on apache geronimo.

<dependency>
 <groupId>org.apache.geronimo.specs</groupId>
 <artifactId>geronimo-validation_1.0_spec</artifactId>
 <version>1.1</version>
</dependency>
<dependency>
 <groupId>org.apache.bval</groupId>
 <artifactId>org.apache.bval.bundle</artifactId>
 <version>0.5</version>
</dependency>

I tried removing geronimo dependency but there were a few compilation errors. For example:

ValidatorFactory avf =  Validation.byProvider(ApacheValidationProvider.class).configure().buildValidatorFactory();

ValidatoFactory was not recognized - but this problem was resolved on including the geronimo dependency.

Why is apache bval dependent on geronimo?

Swapna Ch
  • 105
  • 1
  • 1
  • 5

1 Answers1

0

I don't think there is a dependency to Geronimo directly. It seems that for some reason Geronimo/Apache re-bundles the Bean Validation API. This API is needed for any Bean Validation provider. It seems the Geronimo artifact also adds some OSGi related things, but otherwise its just the Bean Validation API.

You can try to replace it with the official Bean Validation API:

<dependency>
  <groupId>javax.validation</groupId>
  <artifactId>validation-api</artifactId>
  <version>1.0.0.GA</version>
</dependency>

From a Bean Validation point of view this should make no difference.

Hardy
  • 18,659
  • 3
  • 49
  • 65