You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/10/07 08:59:36 UTC
[08/14] camel git commit: CAMEL-9799: Add karaf feature and test
CAMEL-9799: Add karaf feature and test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/408a7465
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/408a7465
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/408a7465
Branch: refs/heads/master
Commit: 408a7465c180b380efd5a9f695ea092b7efea0be
Parents: f7c2780
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Oct 7 10:03:26 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Oct 7 10:03:26 2017 +0200
----------------------------------------------------------------------
components/camel-everit-json-schema/pom.xml | 1 +
.../jsonschema/JsonSchemaValidatorEndpoint.java | 2 +-
parent/pom.xml | 7 -----
.../features/src/main/resources/features.xml | 13 ++++++++
.../itest/karaf/CamelEveritJsonSchemaTest.java | 33 ++++++++++++++++++++
5 files changed, 48 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/408a7465/components/camel-everit-json-schema/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-everit-json-schema/pom.xml b/components/camel-everit-json-schema/pom.xml
index b913a3c..cab2c27 100644
--- a/components/camel-everit-json-schema/pom.xml
+++ b/components/camel-everit-json-schema/pom.xml
@@ -52,6 +52,7 @@
<dependency>
<groupId>com.github.everit-org.json-schema</groupId>
<artifactId>org.everit.json.schema</artifactId>
+ <version>${everit-org-json-schema-version}</version>
</dependency>
<!-- for testing -->
http://git-wip-us.apache.org/repos/asf/camel/blob/408a7465/components/camel-everit-json-schema/src/main/java/org/apache/camel/component/everit/jsonschema/JsonSchemaValidatorEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-everit-json-schema/src/main/java/org/apache/camel/component/everit/jsonschema/JsonSchemaValidatorEndpoint.java b/components/camel-everit-json-schema/src/main/java/org/apache/camel/component/everit/jsonschema/JsonSchemaValidatorEndpoint.java
index 4fa04d0..afca7a3 100644
--- a/components/camel-everit-json-schema/src/main/java/org/apache/camel/component/everit/jsonschema/JsonSchemaValidatorEndpoint.java
+++ b/components/camel-everit-json-schema/src/main/java/org/apache/camel/component/everit/jsonschema/JsonSchemaValidatorEndpoint.java
@@ -37,7 +37,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Validates the payload of a message using XML Schema and JAXP Validation.
+ * Validates the payload of a message using Everit JSON schema validator.
*/
@ManagedResource(description = "Managed JsonSchemaValidatorEndpoint")
@UriEndpoint(scheme = "json-validator", title = "JSON Schema Validator", syntax = "json-validator:resourceUri", producerOnly = true, label = "validation,json")
http://git-wip-us.apache.org/repos/asf/camel/blob/408a7465/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 796b069..0a3cacc 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -4496,13 +4496,6 @@
<version>${jira-rest-client-version}</version>
</dependency>
- <!-- Optional Everit.org JSON Schema -->
- <dependency>
- <groupId>com.github.everit-org.json-schema</groupId>
- <artifactId>org.everit.json.schema</artifactId>
- <version>${everit-org-json-schema-version}</version>
- </dependency>
-
<!-- optional misc -->
<dependency>
<groupId>com.google.code.scriptengines</groupId>
http://git-wip-us.apache.org/repos/asf/camel/blob/408a7465/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 ecb736e..9fb3cee 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -622,6 +622,19 @@
<feature>eventadmin</feature>
<bundle>mvn:org.apache.camel/camel-eventadmin/${project.version}</bundle>
</feature>
+ <feature name='camel-everit-json-schema' version='${project.version}' resolver='(obr)' start-level='50'>
+ <feature version='${project.version}'>camel-core</feature>
+ <bundle dependency='true'>mvn:com.github.everit-org.json-schema/org.everit.json.schema/${everit-org-json-schema-version}</bundle>
+ <bundle dependency='true'>mvn:org.json/json/20170516</bundle>
+ <bundle dependency='true'>mvn:com.damnhandy/handy-uri-templates/2.1.6</bundle>
+ <bundle dependency='true'>mvn:joda-time/joda-time/${jodatime2-bundle-version}</bundle>
+ <bundle dependency='true'>mvn:com.google.guava/guava/22.0</bundle>
+ <bundle dependency='true'>mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>
+ <bundle dependency='true'>mvn:commons-validator/commons-validator/1.6</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-beanutils/${commons-beanutils-bundle-version}</bundle>
+ <bundle dependency='true'>mvn:commons-digester/commons-digester/${commons-digester-version}</bundle>
+ <bundle>mvn:org.apache.camel/camel-everit-json-schema/${project.version}</bundle>
+ </feature>
<feature name='camel-exec' version='${project.version}' resolver='(obr)' start-level='50'>
<feature version='${project.version}'>camel-core</feature>
<bundle dependency='true'>mvn:org.apache.commons/commons-exec/${commons-exec-version}</bundle>
http://git-wip-us.apache.org/repos/asf/camel/blob/408a7465/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelEveritJsonSchemaTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelEveritJsonSchemaTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelEveritJsonSchemaTest.java
new file mode 100644
index 0000000..7288b55
--- /dev/null
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelEveritJsonSchemaTest.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.karaf;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelEveritJsonSchemaTest extends BaseKarafTest {
+
+ public static final String COMPONENT = "json-validator";
+
+ @Test
+ public void test() throws Exception {
+ testComponent("camel-everit-json-schema", COMPONENT);
+ }
+
+}
\ No newline at end of file