You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/12/20 13:26:32 UTC

[camel] branch main updated (d5c41bc -> e1e234e)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from d5c41bc  Upgrade stringtemplate
     new 0de88e9  CAMEL-17351 - Camel Google Functions: Make it possible to configure service account key file as we do in Pubsub and Storage
     new b8dfa2f  CAMEL-17351 - Camel Google Functions: Make it possible to configure service account key file as we do in Pubsub and Storage
     new e1e234e  Regen

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/archetypes/archetype-catalog.xml       | 16 ++++++++--------
 .../functions/GoogleCloudFunctionsClientFactory.java     |  7 +++++--
 2 files changed, 13 insertions(+), 10 deletions(-)

[camel] 01/03: CAMEL-17351 - Camel Google Functions: Make it possible to configure service account key file as we do in Pubsub and Storage

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0de88e913b3593e3297f7c4ccc002f465d6c0298
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 20 14:21:57 2021 +0100

    CAMEL-17351 - Camel Google Functions: Make it possible to configure service account key file as we do in Pubsub and Storage
---
 .../google/functions/GoogleCloudFunctionsClientFactory.java         | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java
index 354c543..32ad7c2 100644
--- a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java
+++ b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.google.functions;
 
 import java.io.FileInputStream;
+import java.io.InputStream;
 
 import com.google.api.gax.core.FixedCredentialsProvider;
 import com.google.auth.Credentials;
@@ -25,6 +26,7 @@ import com.google.cloud.functions.v1.CloudFunctionsServiceClient;
 import com.google.cloud.functions.v1.CloudFunctionsServiceSettings;
 import com.google.common.base.Strings;
 import org.apache.camel.CamelContext;
+import org.apache.camel.support.ResourceHelper;
 
 public final class GoogleCloudFunctionsClientFactory {
     /**
@@ -39,8 +41,10 @@ public final class GoogleCloudFunctionsClientFactory {
             throws Exception {
         CloudFunctionsServiceClient cloudFunctionsClient = null;
         if (!Strings.isNullOrEmpty(configuration.getServiceAccountKey())) {
+            InputStream resolveMandatoryResourceAsInputStream
+                    = ResourceHelper.resolveMandatoryResourceAsInputStream(context, configuration.getServiceAccountKey());
             Credentials myCredentials = ServiceAccountCredentials
-                    .fromStream(new FileInputStream(configuration.getServiceAccountKey()));
+                    .fromStream(resolveMandatoryResourceAsInputStream);
             CloudFunctionsServiceSettings settings = CloudFunctionsServiceSettings.newBuilder()
                     .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();
             cloudFunctionsClient = CloudFunctionsServiceClient.create(settings);

[camel] 03/03: Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e1e234ece629e053ab8449e7d44ff173c1f93f2e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 20 14:25:55 2021 +0100

    Regen
---
 .../camel/catalog/archetypes/archetype-catalog.xml       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/archetypes/archetype-catalog.xml b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/archetypes/archetype-catalog.xml
index e37d8e7..08b1427 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/archetypes/archetype-catalog.xml
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/archetypes/archetype-catalog.xml
@@ -4,49 +4,49 @@
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-api-component</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel component that wraps one or more API proxies.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-cdi</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel project using CDI.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-component</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel component.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-dataformat</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel data format.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-endpointdsl</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel project using Endpoint DSL.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-java</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel project using Java DSL.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-main</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel project using standalone Camel Main.</description>
     </archetype>
     <archetype>
       <groupId>org.apache.camel.archetypes</groupId>
       <artifactId>camel-archetype-spring</artifactId>
-      <version>3.15.0-SNAPSHOT</version>
+      <version>3.14.0-SNAPSHOT</version>
       <description>Creates a new Camel project with added Spring DSL support.</description>
     </archetype>
   </archetypes>

[camel] 02/03: CAMEL-17351 - Camel Google Functions: Make it possible to configure service account key file as we do in Pubsub and Storage

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b8dfa2f2e2aef134f794ef1cdb4ac884975010dc
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 20 14:23:44 2021 +0100

    CAMEL-17351 - Camel Google Functions: Make it possible to configure service account key file as we do in Pubsub and Storage
---
 .../component/google/functions/GoogleCloudFunctionsClientFactory.java    | 1 -
 1 file changed, 1 deletion(-)

diff --git a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java
index 32ad7c2..02b7796 100644
--- a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java
+++ b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsClientFactory.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.google.functions;
 
-import java.io.FileInputStream;
 import java.io.InputStream;
 
 import com.google.api.gax.core.FixedCredentialsProvider;