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 2021/03/02 19:24:53 UTC

[camel-quarkus] branch master updated: Review usage of quarkus.ssl.native in integration tests

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

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/master by this push:
     new 95a4736  Review usage of quarkus.ssl.native in integration tests
95a4736 is described below

commit 95a4736be208bdbbfcecd52eb8627866bb2215ea
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Mar 2 16:02:23 2021 +0000

    Review usage of quarkus.ssl.native in integration tests
    
    Fixes #2306
---
 .../ROOT/pages/reference/extensions/salesforce.adoc |  6 ++++++
 .../ROOT/pages/reference/extensions/twitter.adoc    |  6 ++++++
 .../salesforce/deployment/SalesforceProcessor.java  |  6 ++++++
 .../twitter/deployment/TwitterProcessor.java        |  6 ++++++
 .../as2/src/main/resources/application.properties   |  1 +
 .../aws/src/main/resources/application.properties   |  4 ----
 .../bean/src/main/resources/application.properties  |  4 ----
 .../src/main/resources/application.properties       |  4 ----
 .../fhir/src/main/resources/application.properties  |  4 ----
 .../mail/src/main/resources/application.properties  | 21 ---------------------
 .../src/main/resources/application.properties       |  4 ----
 .../src/main/resources/application.properties       |  1 -
 .../src/main/resources/application.properties       |  5 -----
 .../src/main/resources/application.properties       |  5 -----
 .../src/main/resources/application.properties       |  4 ----
 15 files changed, 25 insertions(+), 56 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/salesforce.adoc b/docs/modules/ROOT/pages/reference/extensions/salesforce.adoc
index 69fdf6e..8feddb7 100644
--- a/docs/modules/ROOT/pages/reference/extensions/salesforce.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/salesforce.adoc
@@ -32,3 +32,9 @@ Please refer to the above link for usage and configuration details.
 ----
 
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== SSL in native mode
+
+This extension auto-enables SSL support in native mode. Hence you do not need to add
+`quarkus.ssl.native=true` to your `application.properties` yourself. See also
+https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
diff --git a/docs/modules/ROOT/pages/reference/extensions/twitter.adoc b/docs/modules/ROOT/pages/reference/extensions/twitter.adoc
index ff9f71c..5ddcdac 100644
--- a/docs/modules/ROOT/pages/reference/extensions/twitter.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/twitter.adoc
@@ -34,3 +34,9 @@ Please refer to the above links for usage and configuration details.
 ----
 
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== SSL in native mode
+
+This extension auto-enables SSL support in native mode. Hence you do not need to add
+`quarkus.ssl.native=true` to your `application.properties` yourself. See also
+https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
diff --git a/extensions/salesforce/deployment/src/main/java/org/apache/camel/quarkus/component/salesforce/deployment/SalesforceProcessor.java b/extensions/salesforce/deployment/src/main/java/org/apache/camel/quarkus/component/salesforce/deployment/SalesforceProcessor.java
index ee3d8d5..b266abc 100644
--- a/extensions/salesforce/deployment/src/main/java/org/apache/camel/quarkus/component/salesforce/deployment/SalesforceProcessor.java
+++ b/extensions/salesforce/deployment/src/main/java/org/apache/camel/quarkus/component/salesforce/deployment/SalesforceProcessor.java
@@ -21,6 +21,7 @@ import java.util.List;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import org.apache.camel.component.salesforce.internal.dto.LoginError;
@@ -55,6 +56,11 @@ class SalesforceProcessor {
     }
 
     @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
     void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
         for (Class<?> type : SALESFORCE_REFLECTIVE_CLASSES) {
             reflectiveClass.produce(
diff --git a/extensions/twitter/deployment/src/main/java/org/apache/camel/quarkus/component/twitter/deployment/TwitterProcessor.java b/extensions/twitter/deployment/src/main/java/org/apache/camel/quarkus/component/twitter/deployment/TwitterProcessor.java
index 9c84e09..e5e69ff 100644
--- a/extensions/twitter/deployment/src/main/java/org/apache/camel/quarkus/component/twitter/deployment/TwitterProcessor.java
+++ b/extensions/twitter/deployment/src/main/java/org/apache/camel/quarkus/component/twitter/deployment/TwitterProcessor.java
@@ -18,6 +18,7 @@ package org.apache.camel.quarkus.component.twitter.deployment;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import org.apache.camel.component.twitter.AbstractTwitterComponent;
@@ -31,6 +32,11 @@ class TwitterProcessor {
     }
 
     @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
     void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 AbstractTwitterComponent.class));
diff --git a/integration-tests/as2/src/main/resources/application.properties b/integration-tests/as2/src/main/resources/application.properties
index 8136208..521b3ba 100644
--- a/integration-tests/as2/src/main/resources/application.properties
+++ b/integration-tests/as2/src/main/resources/application.properties
@@ -15,4 +15,5 @@
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
 
+# For (non-mandatory) client / server payload encryption
 quarkus.ssl.native=true
diff --git a/integration-tests/aws/src/main/resources/application.properties b/integration-tests/aws/src/main/resources/application.properties
index b683b40..1e40e3c 100644
--- a/integration-tests/aws/src/main/resources/application.properties
+++ b/integration-tests/aws/src/main/resources/application.properties
@@ -14,10 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.ssl.native=true
 
 #
 # Camel :: AWS S3
diff --git a/integration-tests/bean/src/main/resources/application.properties b/integration-tests/bean/src/main/resources/application.properties
index b3f34ca..06aeb9f 100644
--- a/integration-tests/bean/src/main/resources/application.properties
+++ b/integration-tests/bean/src/main/resources/application.properties
@@ -14,10 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.ssl.native=true
 
 # A test value
 my.foo.property = foo
diff --git a/integration-tests/dataformats-json/src/main/resources/application.properties b/integration-tests/dataformats-json/src/main/resources/application.properties
index f928ec0..9eaefb3 100644
--- a/integration-tests/dataformats-json/src/main/resources/application.properties
+++ b/integration-tests/dataformats-json/src/main/resources/application.properties
@@ -14,10 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.ssl.native=true
 
 #
 # Camel
diff --git a/integration-tests/fhir/src/main/resources/application.properties b/integration-tests/fhir/src/main/resources/application.properties
index bb884e0..b7e9f8f 100644
--- a/integration-tests/fhir/src/main/resources/application.properties
+++ b/integration-tests/fhir/src/main/resources/application.properties
@@ -14,10 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.ssl.native=true
 
 #
 # Quarkus :: Camel :: FHIR
diff --git a/integration-tests/mail/src/main/resources/application.properties b/integration-tests/mail/src/main/resources/application.properties
deleted file mode 100644
index f5e2b17..0000000
--- a/integration-tests/mail/src/main/resources/application.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#
-# Quarkus
-#
-quarkus.ssl.native=true
diff --git a/integration-tests/platform-http-engine/src/main/resources/application.properties b/integration-tests/platform-http-engine/src/main/resources/application.properties
index e760f69..768a767 100644
--- a/integration-tests/platform-http-engine/src/main/resources/application.properties
+++ b/integration-tests/platform-http-engine/src/main/resources/application.properties
@@ -17,9 +17,5 @@
 #
 # Quarkus
 #
-quarkus.ssl.native=true
 quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
 quarkus.log.category."org.apache.camel.quarkus.component.platform.http".level = INFO
-#
-# Quarkus :: Camel
-#
diff --git a/integration-tests/platform-http/src/main/resources/application.properties b/integration-tests/platform-http/src/main/resources/application.properties
index 5fee51c..b9e3e0f 100644
--- a/integration-tests/platform-http/src/main/resources/application.properties
+++ b/integration-tests/platform-http/src/main/resources/application.properties
@@ -17,7 +17,6 @@
 #
 # Quarkus
 #
-quarkus.ssl.native=true
 quarkus.http.body.uploads-directory=target/uploads
 quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
 quarkus.log.category."org.apache.camel.quarkus.component.platform.http".level = INFO
diff --git a/integration-tests/salesforce/src/main/resources/application.properties b/integration-tests/salesforce/src/main/resources/application.properties
index 6b07dbf..b180e3a 100644
--- a/integration-tests/salesforce/src/main/resources/application.properties
+++ b/integration-tests/salesforce/src/main/resources/application.properties
@@ -16,11 +16,6 @@
 ## ---------------------------------------------------------------------------
 
 #
-# Quarkus
-#
-quarkus.ssl.native=true
-
-#
 # Camel :: Salesforce
 #
 camel.component.salesforce.loginUrl = https://login.salesforce.com
diff --git a/integration-tests/servlet/src/main/resources/application.properties b/integration-tests/servlet/src/main/resources/application.properties
index c998164..7f11f67 100644
--- a/integration-tests/servlet/src/main/resources/application.properties
+++ b/integration-tests/servlet/src/main/resources/application.properties
@@ -16,11 +16,6 @@
 ## ---------------------------------------------------------------------------
 
 #
-# Quarkus
-#
-quarkus.ssl.native=true
-
-#
 # Quarkus :: Camel :: Servlet
 #
 quarkus.camel.servlet.url-patterns=/folder-1/*,/folder-2/*
diff --git a/integration-tests/twitter/src/main/resources/application.properties b/integration-tests/twitter/src/main/resources/application.properties
index 4791070..c5b0a9d 100644
--- a/integration-tests/twitter/src/main/resources/application.properties
+++ b/integration-tests/twitter/src/main/resources/application.properties
@@ -14,10 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.ssl.native=true
 
 twitter.user.name={{env:TWITTER_USER_NAME}}