Permalink
Browse files

validation - Extracting hibernate validator dependency from restx-cor…

…e to new restx-validation module. [BREAKING]

It means that to activate bean validation, you will need to explicitely add a dependency on restx-validation
module on your project.
Startup time on project not using restx-validation will then be improved (no hibernate validator will be loaded) for ~250ms
  • Loading branch information...
fcamblor committed Dec 22, 2014
1 parent 6b440af commit 6989675109786048da04efe1beeaa745df5ec852
View
@@ -158,6 +158,7 @@
<module>restx-shell-manager</module>
<module>restx-build-shell</module>
<module>restx-specs-shell</module>
<module>restx-validation</module>
</modules>
View
@@ -25,7 +25,7 @@
<joda-time.version>2.3</joda-time.version>
<jackson.version>2.3.3</jackson.version>
<snakeyaml.version>1.13</snakeyaml.version>
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
<validation-api.version>1.1.0.Final</validation-api.version>
<reflections.version>0.9.9-RC1</reflections.version>
<javax.inject.version>1</javax.inject.version>
<junit.version>4.11</junit.version>
@@ -94,9 +94,9 @@
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${validation-api.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
View
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.restx</groupId>
<artifactId>restx-parent</artifactId>
<version>0.34-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>io.restx</groupId>
<artifactId>restx-validation</artifactId>
<version>0.34-SNAPSHOT</version>
<packaging>jar</packaging>
<name>restx-validation</name>
<properties>
<restx.version>0.34-SNAPSHOT</restx.version>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
</properties>
<dependencies>
<dependency>
<groupId>io.restx</groupId>
<artifactId>restx-factory</artifactId>
<version>${restx.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
</dependencies>
</project>
@@ -1,7 +1,9 @@
package restx.validation;
import org.hibernate.validator.HibernateValidator;
import restx.factory.*;
import restx.factory.Module;
import restx.factory.Name;
import restx.factory.Provides;
import javax.inject.Named;
import javax.validation.Validation;

0 comments on commit 6989675

Please sign in to comment.