0

I am using the Glassfish library like this in my webapp to be in sync with Glassfish embedded libs directory during development. How can I update it to be able to use javax.validation.api 1.1.0? This is the glassfish dependency:

<dependency>
 <groupId>org.glassfish.main.extras</groupId>
 <artifactId>glassfish-embedded-all</artifactId>
 <version>4.0-b72</version>
 <scope>provided</scope>
</dependency>

Unfortunately this glassfish lib collection is still using an older javax.validation-api lib. But to use:

<dependency>
 <groupId>org.hibernate</groupId>
 <artifactId>hibernate-validator</artifactId>
 <version>5.1.0.Final</version>
</dependency>

I need a newer one. Is there any way to update the Glassfish libs if there isn't a new version for glassfish-embedded-all. How do you solve such issues?

Thanks in advance.

1 Answers1

2

Is there any way to update the Glassfish libs if there isn't a new version for glassfish-embedded-all.

Yes, but there is also a new version which is the 4.0 final build of GlassFish.

<dependency>
 <groupId>org.glassfish.main.extras</groupId>
 <artifactId>glassfish-embedded-all</artifactId>
 <version>4.0</version>
 <scope>provided</scope>
</dependency> 

This version includes Hibernate Validator 5.0.0 which already depends on Validation API 1.1.0.

If you need a newer version then Hibernate Validator 5.0.0 you have to extract the corresponding GlassFish module (in this case bean-validation.jar), change the pom.xml to depend on the desired version and rebuild it with mvn package.

See also:

Community
  • 1
  • 1
unwichtich
  • 13,712
  • 4
  • 53
  • 66