camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/6] camel git commit: CAMEL-9172: camel-jolt. Polsihed.
Date Sat, 26 Sep 2015 08:35:00 GMT
CAMEL-9172: camel-jolt. Polsihed.


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

Branch: refs/heads/master
Commit: 04b09d5e4c7d89bdf705b7796a9207417c179914
Parents: 6a02f6c
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Sep 26 08:46:09 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Sep 26 08:46:09 2015 +0200

----------------------------------------------------------------------
 components/camel-jolt/pom.xml                   | 33 +++++++++++------
 .../camel/component/jolt/JoltComponent.java     |  3 --
 .../camel/component/jolt/JoltEndpoint.java      |  4 +--
 .../camel/component/jolt/JoltRemovrTest.java    |  1 -
 .../src/test/resources/log4j.properties         | 37 +++++++++++++++-----
 components/pom.xml                              |  1 +
 parent/pom.xml                                  |  1 +
 7 files changed, 55 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/components/camel-jolt/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-jolt/pom.xml b/components/camel-jolt/pom.xml
index 391b8a8..6109607 100644
--- a/components/camel-jolt/pom.xml
+++ b/components/camel-jolt/pom.xml
@@ -1,5 +1,22 @@
 <?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/maven-v4_0_0.xsd">
+<!--
+    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.
+  -->
+<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/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -9,22 +26,17 @@
     <version>2.16-SNAPSHOT</version>
   </parent>
 
-  <groupId>org.apache.camel</groupId>
   <artifactId>camel-jolt</artifactId>
   <packaging>bundle</packaging>
-
   <name>Camel :: Jolt</name>
   <description>Camel Jolt Support</description>
 
   <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <camel.osgi.export.pkg>org.apache.camel.component.jolt.*</camel.osgi.export.pkg>
     <camel.osgi.export.service>
       org.apache.camel.spi.ComponentResolver;component=jolt,
       org.apache.camel.spi.LanguageResolver;language=jolt
     </camel.osgi.export.service>
-    <jolt-version>0.0.16</jolt-version>
   </properties>
 
   <dependencies>
@@ -32,19 +44,18 @@
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-core</artifactId>
     </dependency>
-    
+
     <dependency>
       <groupId>com.bazaarvoice.jolt</groupId>
       <artifactId>jolt-core</artifactId>
-      <version>0.0.16</version>
+      <version>${jolt-version}</version>
     </dependency>
     <dependency>
       <groupId>com.bazaarvoice.jolt</groupId>
       <artifactId>json-utils</artifactId>
-      <version>0.0.16</version>
+      <version>${jolt-version}</version>
     </dependency>
-    
-    
+
     <!-- logging -->
     <dependency>
       <groupId>org.slf4j</groupId>

http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltComponent.java
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltComponent.java
index 803e0b3..95833db 100644
--- a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltComponent.java
+++ b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltComponent.java
@@ -24,9 +24,6 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.util.ResourceHelper;
 
-/**
- * @version 
- */
 public class JoltComponent extends DefaultComponent {
     private Transform transform;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
index 34f018c..8daef53 100644
--- a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
+++ b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
@@ -34,7 +34,7 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ObjectHelper;
 
-@UriEndpoint(scheme = "jolt", title = "JOLT", syntax = "jolt:/spec.json", producerOnly =
true, label = "transformation")
+@UriEndpoint(scheme = "jolt", title = "JOLT", syntax = "jolt:resourceUri", producerOnly =
true, label = "transformation")
 public class JoltEndpoint extends ResourceEndpoint {
     
     private Transform transform;
@@ -74,7 +74,7 @@ public class JoltEndpoint extends ResourceEndpoint {
         if (transform == null) {
             if (log.isDebugEnabled()) {
                 String path = getResourceUri();
-                log.debug("Velocity content read from resource {} with resourceUri: {} for
endpoint {}", new Object[]{getResourceUri(), path, getEndpointUri()});
+                log.debug("Jolt content read from resource {} with resourceUri: {} for endpoint
{}", new Object[]{getResourceUri(), path, getEndpointUri()});
             }
 
             // Sortr does not require a spec

http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
index 3df0c23..77c0788 100644
--- a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
+++ b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
@@ -46,7 +46,6 @@ public class JoltRemovrTest extends CamelTestSupport {
         assertEquals(2, exchange.getOut().getBody(Map.class).size());
         assertEquals(null, exchange.getOut().getBody(Map.class).get("removeMe"));
         assertEquals("World", exchange.getOut().getBody(Map.class).get("Hello"));
-        
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/components/camel-jolt/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-jolt/src/test/resources/log4j.properties b/components/camel-jolt/src/test/resources/log4j.properties
index 3b1bd38..cbed905 100644
--- a/components/camel-jolt/src/test/resources/log4j.properties
+++ b/components/camel-jolt/src/test/resources/log4j.properties
@@ -1,14 +1,35 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
 #
-# The logging properties used
+# The logging properties used during tests..
 #
-log4j.rootLogger=INFO, out
+log4j.rootLogger=INFO, file
 
-# uncomment the following line to turn on Camel debugging
-#log4j.logger.org.apache.camel=DEBUG
+#log4j.logger.org.apache.camel.component.jolt=DEBUG
 
 # CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
 
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-jolt-test.log
+log4j.appender.file.append=false

http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index cc308fb..f033c40 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -140,6 +140,7 @@
     <module>camel-jing</module>
     <module>camel-jira</module>
     <module>camel-jmx</module>
+    <module>camel-jolt</module>
     <module>camel-josql</module>
     <module>camel-jpa</module>
     <module>camel-jsonpath</module>

http://git-wip-us.apache.org/repos/asf/camel/blob/04b09d5e/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 88b77b6..2febc7d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -287,6 +287,7 @@
     <jodatime-bundle-version>1.6.2</jodatime-bundle-version>
     <jodatime2-bundle-version>2.8.2</jodatime2-bundle-version>
     <jolokia-version>1.3.1</jolokia-version>
+    <jolt-version>0.0.16</jolt-version>
     <josql-bundle-version>1.5_5</josql-bundle-version>
     <josql-version>1.5</josql-version>
     <jruby-version>1.7.18</jruby-version>


Mime
View raw message