Repository: camel
Updated Branches:
  refs/heads/master b1f8b6f91 -> 61faaa501


CAMEL-11650 - Use Hibernate Validator 6.x where possible


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/61faaa50
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/61faaa50
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/61faaa50

Branch: refs/heads/master
Commit: 61faaa50161f346ff36cb92354506f7d4558151f
Parents: b1f8b6f
Author: Andrea Cosentino <anco...@gmail.com>
Authored: Wed Aug 9 08:53:49 2017 +0200
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Wed Aug 9 08:53:49 2017 +0200

----------------------------------------------------------------------
 components/camel-bean-validator/pom.xml             |  8 ++++----
 .../bean/validator/BeanValidatorRouteTest.java      |  6 +++---
 components/camel-cm-sms/pom.xml                     | 10 +++++-----
 .../src/main/docs/cm-sms-component.adoc             |  6 +++---
 parent/pom.xml                                      |  5 ++++-
 .../karaf/features/src/main/resources/features.xml  | 16 +++-------------
 6 files changed, 22 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/61faaa50/components/camel-bean-validator/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-bean-validator/pom.xml 
b/components/camel-bean-validator/pom.xml
index 011ac4f..0df7966 100644
--- a/components/camel-bean-validator/pom.xml
+++ b/components/camel-bean-validator/pom.xml
@@ -43,7 +43,7 @@
             <artifactId>camel-core</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.hibernate</groupId>
+            <groupId>org.hibernate.validator</groupId>
             <artifactId>hibernate-validator</artifactId>
             <version>${hibernate-validator-version}</version>
             <exclusions>
@@ -61,12 +61,12 @@
         <dependency>
             <groupId>javax.el</groupId>
             <artifactId>javax.el-api</artifactId>
-            <version>${javax.el-api-version}</version>
+            <version>${javax.el-api-hibernate-validator-version}</version>
         </dependency>
         <dependency>
-            <groupId>org.glassfish.web</groupId>
+            <groupId>org.glassfish</groupId>
             <artifactId>javax.el</artifactId>
-            <version>${javax.el-version}</version>
+            <version>${javax.el-hibernate-validator-version}</version>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>

http://git-wip-us.apache.org/repos/asf/camel/blob/61faaa50/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
 
b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
index 261df77..93cfe11 100644
--- 
a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
+++ 
b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
@@ -101,7 +101,7 @@ public class BeanValidatorRouteTest extends 
CamelTestSupport {
             ConstraintViolation<Object> constraintViolation = 
constraintViolations.iterator().next();
             assertEquals("licensePlate", 
constraintViolation.getPropertyPath().toString());
             assertEquals(null, constraintViolation.getInvalidValue());
-            assertEquals("may not be null", constraintViolation.getMessage());
+            assertEquals("must not be null", constraintViolation.getMessage());
         }
         
         car.setLicensePlate("D-A");
@@ -138,7 +138,7 @@ public class BeanValidatorRouteTest extends 
CamelTestSupport {
             ConstraintViolation<Object> constraintViolation = 
constraintViolations.iterator().next();
             assertEquals("licensePlate", 
constraintViolation.getPropertyPath().toString());
             assertEquals(null, constraintViolation.getInvalidValue());
-            assertEquals("may not be null", constraintViolation.getMessage());
+            assertEquals("must not be null", constraintViolation.getMessage());
         }
         
         car.setLicensePlate("D-A");
@@ -212,7 +212,7 @@ public class BeanValidatorRouteTest extends 
CamelTestSupport {
             ConstraintViolation<Object> constraintViolation = 
constraintViolations.iterator().next();
             assertEquals("manufacturer", 
constraintViolation.getPropertyPath().toString());
             assertEquals(null, constraintViolation.getInvalidValue());
-            assertEquals("may not be null", constraintViolation.getMessage());
+            assertEquals("must not be null", constraintViolation.getMessage());
         }
         
         car.setManufacturer("BMW");

http://git-wip-us.apache.org/repos/asf/camel/blob/61faaa50/components/camel-cm-sms/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-cm-sms/pom.xml b/components/camel-cm-sms/pom.xml
index 4feeb6e..2f79d6f 100644
--- a/components/camel-cm-sms/pom.xml
+++ b/components/camel-cm-sms/pom.xml
@@ -64,15 +64,15 @@
     <dependency>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>
-      <version>${validation-api-version}</version>
+      <version>${validation-api-hibernate-validator-version}</version>
     </dependency>
     <dependency>
       <groupId>javax.el</groupId>
       <artifactId>javax.el-api</artifactId>
-      <version>${javax.el-api-version}</version>
+      <version>${javax.el-api-hibernate-validator-version}</version>
     </dependency>
     <dependency>
-      <groupId>org.hibernate</groupId>
+      <groupId>org.hibernate.validator</groupId>
       <artifactId>hibernate-validator</artifactId>
       <version>${hibernate-validator-version}</version>
     </dependency>
@@ -104,9 +104,9 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.glassfish.web</groupId>
+      <groupId>org.glassfish</groupId>
       <artifactId>javax.el</artifactId>
-      <version>${javax.el-version}</version>
+      <version>${javax.el-hibernate-validator-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/61faaa50/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc 
b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc
index 592c731..277c920 100644
--- a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc
+++ b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc
@@ -56,9 +56,9 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
 | Name | Description | Default | Type
-| **defaultFrom** (producer) | This is the sender name. The maximum length is 
11 characters. |  | String
-| **defaultMaxNumberOfParts** (producer) | If it is a multipart message forces 
the max number. Message can be truncated. Technically the gateway will first 
check if a message is larger than 160 characters if so the message will be cut 
into multiple 153 characters parts limited by these parameters. | 8 | int
-| **productToken** (producer) | *Required* The unique token to use |  | String
+| **defaultFrom** (producer) | This is the sender name. The maximum length is 
11 characters. |  | String)
+| **defaultMaxNumberOfParts** (producer) | If it is a multipart message forces 
the max number. Message can be truncated. Technically the gateway will first 
check if a message is larger than 160 characters if so the message will be cut 
into multiple 153 characters parts limited by these parameters. | 8 | 
Max(8L)::Int)
+| **productToken** (producer) | *Required* The unique token to use |  | String)
 | **testConnectionOnStartup** (producer) | Whether to test the connection to 
the SMS Gateway on startup | false | boolean
 | **synchronous** (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
 |=======================================================================

http://git-wip-us.apache.org/repos/asf/camel/blob/61faaa50/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 8717913..07b84fe 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -281,7 +281,7 @@
     <hazelcast-version>3.8.3</hazelcast-version>
     <hbase-version>1.2.1</hbase-version>
     <hessian-version>4.0.38</hessian-version>
-    <hibernate-validator-version>5.4.1.Final</hibernate-validator-version>
+    <hibernate-validator-version>6.0.1.Final</hibernate-validator-version>
     <hibernate-version>5.0.12.Final</hibernate-version>
     <hikaricp-version>2.3.13</hikaricp-version>
     <hk2-version>2.3.0</hk2-version>
@@ -339,6 +339,8 @@
     <javassist-version>3.20.0-GA</javassist-version>
     <javax.el-api-version>2.2.5</javax.el-api-version>
     <javax.el-version>2.2.5</javax.el-version>
+    
<javax.el-api-hibernate-validator-version>3.0.1-b04</javax.el-api-hibernate-validator-version>
+    
<javax.el-hibernate-validator-version>3.0.1-b08</javax.el-hibernate-validator-version>
     <javax-inject-bundle-version>1_2</javax-inject-bundle-version>
     <javax-mail-version>1.6.0</javax-mail-version>
     <javax.servlet-api-version>3.1.0</javax.servlet-api-version>
@@ -687,6 +689,7 @@
     <urlrewritefilter-version>4.0.4</urlrewritefilter-version>
     <urlrewritefilter-bundle-version>4.0.4_1</urlrewritefilter-bundle-version>
     <validation-api-version>1.1.0.Final</validation-api-version>
+    
<validation-api-hibernate-validator-version>2.0.0.Final</validation-api-hibernate-validator-version>
     <velocity-bundle-version>1.7_6</velocity-bundle-version>
     <velocity-tools-version>2.0</velocity-tools-version>
     <velocity-version>1.7</velocity-version>

http://git-wip-us.apache.org/repos/asf/camel/blob/61faaa50/platforms/karaf/features/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/platforms/karaf/features/src/main/resources/features.xml 
b/platforms/karaf/features/src/main/resources/features.xml
index df4b31b..01b7862 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -21,6 +21,7 @@
   
<repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxf-version}/xml/features</repository>
   
<repository>mvn:org.apache.jclouds.karaf/jclouds-karaf/${jclouds-version}/xml/features</repository>
   
<repository>mvn:org.ops4j.pax.cdi/pax-cdi-features/${pax-cdi-version}/xml/features</repository>
+  
<repository>mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/${hibernate-validator-version}/xml/features</repository>
 
   <feature name='xml-specs-api' version='${servicemix-specs-version}' 
resolver='(obr)' start-level='10'>
     <bundle 
dependency='true'>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-specs-version}</bundle>
@@ -203,12 +204,7 @@
   </feature>
   <feature name='camel-bean-validator' version='${project.version}' 
resolver='(obr)' start-level='50'>
     <feature version='${project.version}'>camel-core</feature>
-    <bundle 
dependency='true'>mvn:javax.validation/validation-api/${validation-api-version}</bundle>
-    <bundle 
dependency='true'>mvn:javax.el/javax.el-api/${javax.el-api-version}</bundle>
-    <bundle 
dependency='true'>mvn:org.glassfish.web/javax.el/${javax.el-version}</bundle>
-    <bundle 
dependency='true'>mvn:com.fasterxml/classmate/${classmate-version}</bundle>
-    <bundle 
dependency='true'>mvn:org.hibernate/hibernate-validator/${hibernate-validator-version}</bundle>
-    <bundle 
dependency='true'>mvn:org.jboss.logging/jboss-logging/${jboss-logging-version}</bundle>
+    <feature 
version='${hibernate-validator-version}'>hibernate-validator</feature>
     
<bundle>mvn:org.apache.camel/camel-bean-validator/${project.version}</bundle>
   </feature>
   <feature name='camel-beanio' version='${project.version}' resolver='(obr)' 
start-level='50'>
@@ -353,17 +349,11 @@
   <feature name='camel-cm-sms' version='${project.version}' resolver='(obr)' 
start-level='50'>
     <feature version='${project.version}'>camel-core</feature>
     <feature version='${cxf-version-range}'>cxf-specs</feature>
+    <feature 
version='${hibernate-validator-version}'>hibernate-validator</feature>
     <bundle 
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.libphonenumber/${libphonenumber-bundle-version}</bundle>
     <bundle 
dependency='true'>mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore4-version}</bundle>
     <bundle 
dependency='true'>mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient4-version}</bundle>
     <bundle 
dependency='true'>mvn:javax.servlet/javax.servlet-api/${javax.servlet-api-version}</bundle>
-    <bundle dependency='true'>mvn:org.jsoup/jsoup/${jsoup-version}</bundle>
-    <bundle 
dependency='true'>mvn:javax.validation/validation-api/${validation-api-version}</bundle>
-    <bundle 
dependency='true'>mvn:javax.el/javax.el-api/${javax.el-api-version}</bundle>
-    <bundle 
dependency='true'>mvn:org.glassfish.web/javax.el/${javax.el-version}</bundle>
-    <bundle 
dependency='true'>mvn:com.fasterxml/classmate/${classmate-version}</bundle>
-    <bundle 
dependency='true'>mvn:org.hibernate/hibernate-validator/${hibernate-validator-version}</bundle>
-    <bundle 
dependency='true'>mvn:org.jboss.logging/jboss-logging/${jboss-logging-version}</bundle>
     <bundle>mvn:org.apache.camel/camel-cm-sms/${project.version}</bundle>
   </feature>
   <feature name='camel-cmis' version='${project.version}' resolver='(obr)' 
start-level='50'>

Reply via email to