You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2016/10/12 02:16:29 UTC

[01/12] camel git commit: remove non spring boot compatible starters

Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 37a12df6a -> b15c2f5d6
  refs/heads/master 5d79ddc35 -> 471e25a31


remove non spring boot compatible starters


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

Branch: refs/heads/master
Commit: 404ecc5625b34dd011f5257206cda4d60341bfac
Parents: 5d79ddc
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 19:25:12 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 19:25:12 2016 -0230

----------------------------------------------------------------------
 components-starter/pom.xml | 9 ---------
 1 file changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/404ecc56/components-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/pom.xml b/components-starter/pom.xml
index 4aca1b4..72bf37a 100644
--- a/components-starter/pom.xml
+++ b/components-starter/pom.xml
@@ -77,14 +77,12 @@
     <module>camel-beanio-starter</module>
     <module>camel-beanstalk-starter</module>
     <module>camel-bindy-starter</module>
-    <module>camel-blueprint-starter</module>
     <module>camel-boon-starter</module>
     <module>camel-box-starter</module>
     <module>camel-braintree-starter</module>
     <module>camel-cache-starter</module>
     <module>camel-cassandraql-starter</module>
     <module>camel-castor-starter</module>
-    <module>camel-cdi-starter</module>
     <module>camel-chronicle-starter</module>
     <module>camel-chunk-starter</module>
     <module>camel-cm-sms-starter</module>
@@ -107,7 +105,6 @@
     <module>camel-dropbox-starter</module>
     <module>camel-eclipse-starter</module>
     <module>camel-ehcache-starter</module>
-    <module>camel-ejb-starter</module>
     <module>camel-elasticsearch-starter</module>
     <module>camel-elsql-starter</module>
     <module>camel-etcd-starter</module>
@@ -143,7 +140,6 @@
     <module>camel-http-starter</module>
     <module>camel-http4-starter</module>
     <module>camel-hystrix-starter</module>
-    <module>camel-ibatis-starter</module>
     <module>camel-ical-starter</module>
     <module>camel-ignite-starter</module>
     <module>camel-infinispan-starter</module>
@@ -157,7 +153,6 @@
     <module>camel-jaxb-starter</module>
     <module>camel-jbpm-starter</module>
     <module>camel-jcache-starter</module>
-    <module>camel-jclouds-starter</module>
     <module>camel-jcr-starter</module>
     <module>camel-jdbc-starter</module>
     <module>camel-jetty-common-starter</module>
@@ -215,7 +210,6 @@
     <module>camel-pgevent-starter</module>
     <module>camel-printer-starter</module>
     <module>camel-protobuf-starter</module>
-    <module>camel-quartz-starter</module>
     <module>camel-quartz2-starter</module>
     <module>camel-quickfix-starter</module>
     <module>camel-rabbitmq-starter</module>
@@ -245,7 +239,6 @@
     <module>camel-snmp-starter</module>
     <module>camel-soap-starter</module>
     <module>camel-solr-starter</module>
-    <module>camel-spark-rest-starter</module>
     <module>camel-spark-starter</module>
     <module>camel-splunk-starter</module>
     <module>camel-spring-batch-starter</module>
@@ -269,8 +262,6 @@
     <module>camel-tagsoup-starter</module>
     <module>camel-tarfile-starter</module>
     <module>camel-telegram-starter</module>
-    <module>camel-test-starter</module>
-    <module>camel-testng-starter</module>
     <module>camel-twitter-starter</module>
     <module>camel-undertow-starter</module>
     <module>camel-univocity-parsers-starter</module>


[09/12] camel git commit: CAMEL-10381 - fix NPE from component configuration

Posted by ja...@apache.org.
CAMEL-10381 - fix NPE from component configuration


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

Branch: refs/heads/camel-2.18.x
Commit: 645d024b442bb130eaebbff41a494ac313bc6868
Parents: 7a1ee6b
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 19:47:27 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:44:20 2016 -0230

----------------------------------------------------------------------
 .../component/google/drive/GoogleDriveComponent.java      | 10 +++++++---
 .../camel/component/google/drive/GoogleDriveEndpoint.java |  2 +-
 .../component/google/drive/GoogleDriveFilesConverter.java |  3 ++-
 3 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/645d024b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
index 2554d0e..84dc9e2 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
@@ -44,10 +44,11 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
         return GoogleDriveApiName.fromValue(apiNameStr);
     }
 
-    public Drive getClient() {
+    public Drive getClient(GoogleDriveConfiguration googleDriveConfiguration) {
         if (client == null) {
-            client = getClientFactory().makeClient(configuration.getClientId(), configuration.getClientSecret(), configuration.getScopes(), 
-                configuration.getApplicationName(), configuration.getRefreshToken(), configuration.getAccessToken());
+            client = getClientFactory().makeClient(googleDriveConfiguration.getClientId(), googleDriveConfiguration.getClientSecret(), 
+                    googleDriveConfiguration.getScopes(), googleDriveConfiguration.getApplicationName(), 
+                    googleDriveConfiguration.getRefreshToken(), googleDriveConfiguration.getAccessToken());
         }
         return client;
     }
@@ -69,6 +70,9 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
 
     @Override
     public GoogleDriveConfiguration getConfiguration() {
+        if (configuration == null) {
+            configuration = new GoogleDriveConfiguration();
+        }
         return super.getConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/645d024b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
index ede52d5..b80a2df 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
@@ -124,7 +124,7 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
     }
     
     public Drive getClient() {
-        return ((GoogleDriveComponent)getComponent()).getClient();
+        return ((GoogleDriveComponent)getComponent()).getClient(configuration);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/645d024b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
index 7d43705..d227301 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
@@ -98,6 +98,7 @@ public final class GoogleDriveFilesConverter {
     }
     
     private static Drive getClient(Exchange exchange) {
-        return exchange.getContext().getComponent("google-drive", GoogleDriveComponent.class).getClient();
+        GoogleDriveComponent component = exchange.getContext().getComponent("google-drive", GoogleDriveComponent.class);
+        return component.getClient(component.getConfiguration());
     }
 }


[03/12] camel git commit: add missed test case

Posted by ja...@apache.org.
add missed test case


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

Branch: refs/heads/master
Commit: d0af43db34f10c4a3c1bd6efacd668b398e9ca4d
Parents: fab550a
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 19:47:58 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 19:47:58 2016 -0230

----------------------------------------------------------------------
 .../google/drive/DriveConfigurationTest.java    | 66 ++++++++++++++++++++
 1 file changed, 66 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d0af43db/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java
new file mode 100644
index 0000000..3d113d3
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java
@@ -0,0 +1,66 @@
+/**
+ * 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.component.google.drive;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DriveConfigurationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveConfigurationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName();
+    private static final String TEST_URI = "google-drive://" + PATH_PREFIX + "/copy?clientId=a&clientSecret=b&applicationName=c&accessToken=d&refreshToken=e";
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        final CamelContext context = new DefaultCamelContext(createRegistry());
+
+        // add GoogleDriveComponent to Camel context but don't set up configuration
+        final GoogleDriveComponent component = new GoogleDriveComponent(context);
+        context.addComponent("google-drive", component);
+
+        return context;
+    }
+    
+    @Test
+    public void testConfiguration() throws Exception {
+        GoogleDriveEndpoint endpoint = getMandatoryEndpoint(TEST_URI, GoogleDriveEndpoint.class);
+        GoogleDriveConfiguration configuration = endpoint.getConfiguration();
+        assertNotNull(configuration);
+        assertEquals("a", configuration.getClientId());
+        assertEquals("b", configuration.getClientSecret());
+        assertEquals("c", configuration.getApplicationName());
+        assertEquals("d", configuration.getAccessToken());
+        assertEquals("e", configuration.getRefreshToken());        
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct://COPY").to(TEST_URI);
+            }
+        };
+    }
+}


[05/12] camel git commit: fix test error

Posted by ja...@apache.org.
fix test error


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

Branch: refs/heads/master
Commit: 329aca67f5d2fc0d4eaa8226a346c7c4c10ed871
Parents: d843200
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 23:36:18 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:36:18 2016 -0230

----------------------------------------------------------------------
 .../calendar/CalendarConfigurationTest.java       | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/329aca67/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
index a70934e..c22915f 100644
--- a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -16,28 +16,44 @@
  */
 package org.apache.camel.component.google.calendar;
 
+import java.util.Random;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;
 import org.apache.camel.component.google.calendar.internal.GoogleCalendarApiCollection;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.api.services.calendar.model.Calendar;
+
 public class CalendarConfigurationTest extends AbstractGoogleCalendarTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(CalendarConfigurationTest.class);
     private static final String PATH_PREFIX = GoogleCalendarApiCollection.getCollection().getApiName(CalendarCalendarsApiMethod.class).getName();
     private static final String TEST_URI = "google-calendar://" + PATH_PREFIX + "/get?clientId=a&clientSecret=b&applicationName=c&accessToken=d&refreshToken=e";
 
+    @Before
+    @Override    
+    public void createTestCalendar() {
+    }
+
+    @After
+    @Override
+    public void deleteTestCalendar() {
+    }
+    
     @Override
     protected CamelContext createCamelContext() throws Exception {
         final CamelContext context = new DefaultCamelContext(createRegistry());
 
         // add GoogleCalendarComponent to Camel context but don't set up configuration
         final GoogleCalendarComponent component = new GoogleCalendarComponent(context);
-        context.addComponent("google-drive", component);
+        context.addComponent("google-calendar", component);
 
         return context;
     }


[08/12] camel git commit: add missed test case

Posted by ja...@apache.org.
add missed test case


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

Branch: refs/heads/camel-2.18.x
Commit: fbcaded8349754e574d6900dca863bbdec71b6c9
Parents: 645d024
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 19:47:58 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:44:20 2016 -0230

----------------------------------------------------------------------
 .../google/drive/DriveConfigurationTest.java    | 66 ++++++++++++++++++++
 1 file changed, 66 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fbcaded8/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java
new file mode 100644
index 0000000..3d113d3
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveConfigurationTest.java
@@ -0,0 +1,66 @@
+/**
+ * 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.component.google.drive;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DriveConfigurationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveConfigurationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName();
+    private static final String TEST_URI = "google-drive://" + PATH_PREFIX + "/copy?clientId=a&clientSecret=b&applicationName=c&accessToken=d&refreshToken=e";
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        final CamelContext context = new DefaultCamelContext(createRegistry());
+
+        // add GoogleDriveComponent to Camel context but don't set up configuration
+        final GoogleDriveComponent component = new GoogleDriveComponent(context);
+        context.addComponent("google-drive", component);
+
+        return context;
+    }
+    
+    @Test
+    public void testConfiguration() throws Exception {
+        GoogleDriveEndpoint endpoint = getMandatoryEndpoint(TEST_URI, GoogleDriveEndpoint.class);
+        GoogleDriveConfiguration configuration = endpoint.getConfiguration();
+        assertNotNull(configuration);
+        assertEquals("a", configuration.getClientId());
+        assertEquals("b", configuration.getClientSecret());
+        assertEquals("c", configuration.getApplicationName());
+        assertEquals("d", configuration.getAccessToken());
+        assertEquals("e", configuration.getRefreshToken());        
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct://COPY").to(TEST_URI);
+            }
+        };
+    }
+}


[11/12] camel git commit: fix test error

Posted by ja...@apache.org.
fix test error


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

Branch: refs/heads/camel-2.18.x
Commit: 8de429e1236f1f2fb24098a924eb651ede85adc8
Parents: 6d66397
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 23:36:18 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:44:21 2016 -0230

----------------------------------------------------------------------
 .../calendar/CalendarConfigurationTest.java       | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8de429e1/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
index a70934e..c22915f 100644
--- a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -16,28 +16,44 @@
  */
 package org.apache.camel.component.google.calendar;
 
+import java.util.Random;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;
 import org.apache.camel.component.google.calendar.internal.GoogleCalendarApiCollection;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.api.services.calendar.model.Calendar;
+
 public class CalendarConfigurationTest extends AbstractGoogleCalendarTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(CalendarConfigurationTest.class);
     private static final String PATH_PREFIX = GoogleCalendarApiCollection.getCollection().getApiName(CalendarCalendarsApiMethod.class).getName();
     private static final String TEST_URI = "google-calendar://" + PATH_PREFIX + "/get?clientId=a&clientSecret=b&applicationName=c&accessToken=d&refreshToken=e";
 
+    @Before
+    @Override    
+    public void createTestCalendar() {
+    }
+
+    @After
+    @Override
+    public void deleteTestCalendar() {
+    }
+    
     @Override
     protected CamelContext createCamelContext() throws Exception {
         final CamelContext context = new DefaultCamelContext(createRegistry());
 
         // add GoogleCalendarComponent to Camel context but don't set up configuration
         final GoogleCalendarComponent component = new GoogleCalendarComponent(context);
-        context.addComponent("google-drive", component);
+        context.addComponent("google-calendar", component);
 
         return context;
     }


[07/12] camel git commit: remove non spring boot compatible starters

Posted by ja...@apache.org.
remove non spring boot compatible starters


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

Branch: refs/heads/camel-2.18.x
Commit: 7a1ee6bedc1c3572e7abdb0262f08d3435e5d293
Parents: 37a12df
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 19:25:12 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:44:20 2016 -0230

----------------------------------------------------------------------
 components-starter/pom.xml | 9 ---------
 1 file changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7a1ee6be/components-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/pom.xml b/components-starter/pom.xml
index e8a168a..c284305 100644
--- a/components-starter/pom.xml
+++ b/components-starter/pom.xml
@@ -77,14 +77,12 @@
     <module>camel-beanio-starter</module>
     <module>camel-beanstalk-starter</module>
     <module>camel-bindy-starter</module>
-    <module>camel-blueprint-starter</module>
     <module>camel-boon-starter</module>
     <module>camel-box-starter</module>
     <module>camel-braintree-starter</module>
     <module>camel-cache-starter</module>
     <module>camel-cassandraql-starter</module>
     <module>camel-castor-starter</module>
-    <module>camel-cdi-starter</module>
     <module>camel-chronicle-starter</module>
     <module>camel-chunk-starter</module>
     <module>camel-cm-sms-starter</module>
@@ -107,7 +105,6 @@
     <module>camel-dropbox-starter</module>
     <module>camel-eclipse-starter</module>
     <module>camel-ehcache-starter</module>
-    <module>camel-ejb-starter</module>
     <module>camel-elasticsearch-starter</module>
     <module>camel-elsql-starter</module>
     <module>camel-etcd-starter</module>
@@ -143,7 +140,6 @@
     <module>camel-http-starter</module>
     <module>camel-http4-starter</module>
     <module>camel-hystrix-starter</module>
-    <module>camel-ibatis-starter</module>
     <module>camel-ical-starter</module>
     <module>camel-ignite-starter</module>
     <module>camel-infinispan-starter</module>
@@ -157,7 +153,6 @@
     <module>camel-jaxb-starter</module>
     <module>camel-jbpm-starter</module>
     <module>camel-jcache-starter</module>
-    <module>camel-jclouds-starter</module>
     <module>camel-jcr-starter</module>
     <module>camel-jdbc-starter</module>
     <module>camel-jetty-common-starter</module>
@@ -215,7 +210,6 @@
     <module>camel-pgevent-starter</module>
     <module>camel-printer-starter</module>
     <module>camel-protobuf-starter</module>
-    <module>camel-quartz-starter</module>
     <module>camel-quartz2-starter</module>
     <module>camel-quickfix-starter</module>
     <module>camel-rabbitmq-starter</module>
@@ -245,7 +239,6 @@
     <module>camel-snmp-starter</module>
     <module>camel-soap-starter</module>
     <module>camel-solr-starter</module>
-    <module>camel-spark-rest-starter</module>
     <module>camel-spark-starter</module>
     <module>camel-splunk-starter</module>
     <module>camel-spring-batch-starter</module>
@@ -269,8 +262,6 @@
     <module>camel-tagsoup-starter</module>
     <module>camel-tarfile-starter</module>
     <module>camel-telegram-starter</module>
-    <module>camel-test-starter</module>
-    <module>camel-testng-starter</module>
     <module>camel-twitter-starter</module>
     <module>camel-undertow-starter</module>
     <module>camel-univocity-parsers-starter</module>


[10/12] camel git commit: CAMEL-10381 - fix NPE from calendar component configuration

Posted by ja...@apache.org.
CAMEL-10381 - fix NPE from calendar component configuration


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

Branch: refs/heads/camel-2.18.x
Commit: 6d663971259650b626303ca30e77004abcdd3b0a
Parents: fbcaded
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 23:32:37 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:44:21 2016 -0230

----------------------------------------------------------------------
 .../calendar/GoogleCalendarComponent.java       | 15 +++--
 .../google/calendar/GoogleCalendarEndpoint.java |  2 +-
 .../calendar/CalendarConfigurationTest.java     | 66 ++++++++++++++++++++
 3 files changed, 76 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6d663971/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
index d140ee4..84e3092 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
@@ -44,13 +44,13 @@ public class GoogleCalendarComponent extends AbstractApiComponent<GoogleCalendar
         return GoogleCalendarApiName.fromValue(apiNameStr);
     }
 
-    public Calendar getClient() {
+    public Calendar getClient(GoogleCalendarConfiguration config) {
         if (client == null) {
-            client = getClientFactory().makeClient(configuration.getClientId(),
-                    configuration.getClientSecret(), configuration.getScopes(),
-                    configuration.getApplicationName(), configuration.getRefreshToken(),
-                    configuration.getAccessToken(), configuration.getEmailAddress(),
-                    configuration.getP12FileName(), configuration.getUser());
+            client = getClientFactory().makeClient(config.getClientId(),
+                    config.getClientSecret(), config.getScopes(),
+                    config.getApplicationName(), config.getRefreshToken(),
+                    config.getAccessToken(), config.getEmailAddress(),
+                    config.getP12FileName(), config.getUser());
         }
         return client;
     }
@@ -64,6 +64,9 @@ public class GoogleCalendarComponent extends AbstractApiComponent<GoogleCalendar
 
     @Override
     public GoogleCalendarConfiguration getConfiguration() {
+        if (configuration == null) {
+            configuration = new GoogleCalendarConfiguration();
+        }
         return super.getConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6d663971/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
index e955f6c..7ad7f9d 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
@@ -111,7 +111,7 @@ public class GoogleCalendarEndpoint extends AbstractApiEndpoint<GoogleCalendarAp
     }
 
     public Calendar getClient() {
-        return ((GoogleCalendarComponent)getComponent()).getClient();
+        return ((GoogleCalendarComponent)getComponent()).getClient(configuration);
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/6d663971/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
new file mode 100644
index 0000000..a70934e
--- /dev/null
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -0,0 +1,66 @@
+/**
+ * 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.component.google.calendar;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;
+import org.apache.camel.component.google.calendar.internal.GoogleCalendarApiCollection;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CalendarConfigurationTest extends AbstractGoogleCalendarTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(CalendarConfigurationTest.class);
+    private static final String PATH_PREFIX = GoogleCalendarApiCollection.getCollection().getApiName(CalendarCalendarsApiMethod.class).getName();
+    private static final String TEST_URI = "google-calendar://" + PATH_PREFIX + "/get?clientId=a&clientSecret=b&applicationName=c&accessToken=d&refreshToken=e";
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        final CamelContext context = new DefaultCamelContext(createRegistry());
+
+        // add GoogleCalendarComponent to Camel context but don't set up configuration
+        final GoogleCalendarComponent component = new GoogleCalendarComponent(context);
+        context.addComponent("google-drive", component);
+
+        return context;
+    }
+    
+    @Test
+    public void testConfiguration() throws Exception {
+        GoogleCalendarEndpoint endpoint = getMandatoryEndpoint(TEST_URI, GoogleCalendarEndpoint.class);
+        GoogleCalendarConfiguration configuration = endpoint.getConfiguration();
+        assertNotNull(configuration);
+        assertEquals("a", configuration.getClientId());
+        assertEquals("b", configuration.getClientSecret());
+        assertEquals("c", configuration.getApplicationName());
+        assertEquals("d", configuration.getAccessToken());
+        assertEquals("e", configuration.getRefreshToken());        
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct://COPY").to(TEST_URI);
+            }
+        };
+    }
+}


[12/12] camel git commit: fix CS

Posted by ja...@apache.org.
fix CS


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

Branch: refs/heads/camel-2.18.x
Commit: b15c2f5d62eb0285c5d48b9e9199e48abce365aa
Parents: 8de429e
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 23:37:48 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:44:21 2016 -0230

----------------------------------------------------------------------
 .../component/google/calendar/CalendarConfigurationTest.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b15c2f5d/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
index c22915f..6777434 100644
--- a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -18,6 +18,8 @@ package org.apache.camel.component.google.calendar;
 
 import java.util.Random;
 
+import com.google.api.services.calendar.model.Calendar;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;
@@ -29,8 +31,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.api.services.calendar.model.Calendar;
-
 public class CalendarConfigurationTest extends AbstractGoogleCalendarTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(CalendarConfigurationTest.class);


[02/12] camel git commit: CAMEL-10381 - fix NPE from component configuration

Posted by ja...@apache.org.
CAMEL-10381 - fix NPE from component configuration


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

Branch: refs/heads/master
Commit: fab550a7e21467acff6307e707c09d4a90820267
Parents: 404ecc5
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 19:47:27 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 19:47:27 2016 -0230

----------------------------------------------------------------------
 .../component/google/drive/GoogleDriveComponent.java      | 10 +++++++---
 .../camel/component/google/drive/GoogleDriveEndpoint.java |  2 +-
 .../component/google/drive/GoogleDriveFilesConverter.java |  3 ++-
 3 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fab550a7/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
index 2554d0e..84dc9e2 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
@@ -44,10 +44,11 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
         return GoogleDriveApiName.fromValue(apiNameStr);
     }
 
-    public Drive getClient() {
+    public Drive getClient(GoogleDriveConfiguration googleDriveConfiguration) {
         if (client == null) {
-            client = getClientFactory().makeClient(configuration.getClientId(), configuration.getClientSecret(), configuration.getScopes(), 
-                configuration.getApplicationName(), configuration.getRefreshToken(), configuration.getAccessToken());
+            client = getClientFactory().makeClient(googleDriveConfiguration.getClientId(), googleDriveConfiguration.getClientSecret(), 
+                    googleDriveConfiguration.getScopes(), googleDriveConfiguration.getApplicationName(), 
+                    googleDriveConfiguration.getRefreshToken(), googleDriveConfiguration.getAccessToken());
         }
         return client;
     }
@@ -69,6 +70,9 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
 
     @Override
     public GoogleDriveConfiguration getConfiguration() {
+        if (configuration == null) {
+            configuration = new GoogleDriveConfiguration();
+        }
         return super.getConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/fab550a7/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
index ede52d5..b80a2df 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
@@ -124,7 +124,7 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
     }
     
     public Drive getClient() {
-        return ((GoogleDriveComponent)getComponent()).getClient();
+        return ((GoogleDriveComponent)getComponent()).getClient(configuration);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/fab550a7/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
index 7d43705..d227301 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveFilesConverter.java
@@ -98,6 +98,7 @@ public final class GoogleDriveFilesConverter {
     }
     
     private static Drive getClient(Exchange exchange) {
-        return exchange.getContext().getComponent("google-drive", GoogleDriveComponent.class).getClient();
+        GoogleDriveComponent component = exchange.getContext().getComponent("google-drive", GoogleDriveComponent.class);
+        return component.getClient(component.getConfiguration());
     }
 }


[06/12] camel git commit: fix CS

Posted by ja...@apache.org.
fix CS


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

Branch: refs/heads/master
Commit: 471e25a31c95aabc9718430f2c1fed6a88677c1c
Parents: 329aca6
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 23:37:48 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:37:48 2016 -0230

----------------------------------------------------------------------
 .../component/google/calendar/CalendarConfigurationTest.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/471e25a3/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
index c22915f..6777434 100644
--- a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -18,6 +18,8 @@ package org.apache.camel.component.google.calendar;
 
 import java.util.Random;
 
+import com.google.api.services.calendar.model.Calendar;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;
@@ -29,8 +31,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.api.services.calendar.model.Calendar;
-
 public class CalendarConfigurationTest extends AbstractGoogleCalendarTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(CalendarConfigurationTest.class);


[04/12] camel git commit: CAMEL-10381 - fix NPE from calendar component configuration

Posted by ja...@apache.org.
CAMEL-10381 - fix NPE from calendar component configuration


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

Branch: refs/heads/master
Commit: d84320047b3070e99a48e5d478fd9fecd7174b07
Parents: d0af43d
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Tue Oct 11 23:32:37 2016 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Tue Oct 11 23:32:37 2016 -0230

----------------------------------------------------------------------
 .../calendar/GoogleCalendarComponent.java       | 15 +++--
 .../google/calendar/GoogleCalendarEndpoint.java |  2 +-
 .../calendar/CalendarConfigurationTest.java     | 66 ++++++++++++++++++++
 3 files changed, 76 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d8432004/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
index d140ee4..84e3092 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
@@ -44,13 +44,13 @@ public class GoogleCalendarComponent extends AbstractApiComponent<GoogleCalendar
         return GoogleCalendarApiName.fromValue(apiNameStr);
     }
 
-    public Calendar getClient() {
+    public Calendar getClient(GoogleCalendarConfiguration config) {
         if (client == null) {
-            client = getClientFactory().makeClient(configuration.getClientId(),
-                    configuration.getClientSecret(), configuration.getScopes(),
-                    configuration.getApplicationName(), configuration.getRefreshToken(),
-                    configuration.getAccessToken(), configuration.getEmailAddress(),
-                    configuration.getP12FileName(), configuration.getUser());
+            client = getClientFactory().makeClient(config.getClientId(),
+                    config.getClientSecret(), config.getScopes(),
+                    config.getApplicationName(), config.getRefreshToken(),
+                    config.getAccessToken(), config.getEmailAddress(),
+                    config.getP12FileName(), config.getUser());
         }
         return client;
     }
@@ -64,6 +64,9 @@ public class GoogleCalendarComponent extends AbstractApiComponent<GoogleCalendar
 
     @Override
     public GoogleCalendarConfiguration getConfiguration() {
+        if (configuration == null) {
+            configuration = new GoogleCalendarConfiguration();
+        }
         return super.getConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d8432004/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
index e955f6c..7ad7f9d 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
@@ -111,7 +111,7 @@ public class GoogleCalendarEndpoint extends AbstractApiEndpoint<GoogleCalendarAp
     }
 
     public Calendar getClient() {
-        return ((GoogleCalendarComponent)getComponent()).getClient();
+        return ((GoogleCalendarComponent)getComponent()).getClient(configuration);
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/d8432004/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
new file mode 100644
index 0000000..a70934e
--- /dev/null
+++ b/components/camel-google-calendar/src/test/java/org/apache/camel/component/google/calendar/CalendarConfigurationTest.java
@@ -0,0 +1,66 @@
+/**
+ * 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.component.google.calendar;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.calendar.internal.CalendarCalendarsApiMethod;
+import org.apache.camel.component.google.calendar.internal.GoogleCalendarApiCollection;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CalendarConfigurationTest extends AbstractGoogleCalendarTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(CalendarConfigurationTest.class);
+    private static final String PATH_PREFIX = GoogleCalendarApiCollection.getCollection().getApiName(CalendarCalendarsApiMethod.class).getName();
+    private static final String TEST_URI = "google-calendar://" + PATH_PREFIX + "/get?clientId=a&clientSecret=b&applicationName=c&accessToken=d&refreshToken=e";
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        final CamelContext context = new DefaultCamelContext(createRegistry());
+
+        // add GoogleCalendarComponent to Camel context but don't set up configuration
+        final GoogleCalendarComponent component = new GoogleCalendarComponent(context);
+        context.addComponent("google-drive", component);
+
+        return context;
+    }
+    
+    @Test
+    public void testConfiguration() throws Exception {
+        GoogleCalendarEndpoint endpoint = getMandatoryEndpoint(TEST_URI, GoogleCalendarEndpoint.class);
+        GoogleCalendarConfiguration configuration = endpoint.getConfiguration();
+        assertNotNull(configuration);
+        assertEquals("a", configuration.getClientId());
+        assertEquals("b", configuration.getClientSecret());
+        assertEquals("c", configuration.getApplicationName());
+        assertEquals("d", configuration.getAccessToken());
+        assertEquals("e", configuration.getRefreshToken());        
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct://COPY").to(TEST_URI);
+            }
+        };
+    }
+}