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 2020/11/12 07:10:57 UTC

[camel-quarkus] 02/04: Work around camel-main removal of automatic autowire by type

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

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

commit 30dd31f28475672186960a60f527f2690592106d
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Nov 9 15:45:21 2020 +0000

    Work around camel-main removal of automatic autowire by type
    
    See: https://issues.apache.org/jira/browse/CAMEL-15826
---
 .../quarkus/main/deployment/CamelMainAutoConfigurationTest.java   | 1 +
 .../bean-validator/src/main/resources/application.properties      | 2 ++
 .../src/main/resources/application.properties                     | 7 ++-----
 .../src/main/resources/application.properties                     | 7 ++-----
 .../camel/quarkus/component/influxdb/it/InfluxdbResource.java     | 2 ++
 .../src/main/resources/application.properties                     | 8 +++-----
 .../src/main/resources/application.properties                     | 6 +-----
 7 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/extensions-core/main/deployment/src/test/java/org/apache/camel/quarkus/main/deployment/CamelMainAutoConfigurationTest.java b/extensions-core/main/deployment/src/test/java/org/apache/camel/quarkus/main/deployment/CamelMainAutoConfigurationTest.java
index 9d45d7a..4743937 100644
--- a/extensions-core/main/deployment/src/test/java/org/apache/camel/quarkus/main/deployment/CamelMainAutoConfigurationTest.java
+++ b/extensions-core/main/deployment/src/test/java/org/apache/camel/quarkus/main/deployment/CamelMainAutoConfigurationTest.java
@@ -55,6 +55,7 @@ public class CamelMainAutoConfigurationTest {
         Properties props = new Properties();
         props.setProperty("quarkus.banner.enabled", "false");
         props.setProperty("quarkus.arc.remove-unused-beans", "false");
+        props.setProperty("camel.component.log.exchange-formatter", "#autowired");
 
         try {
             props.store(writer, "");
diff --git a/integration-tests/bean-validator/src/main/resources/application.properties b/integration-tests/bean-validator/src/main/resources/application.properties
index a603b03..0bbac92 100644
--- a/integration-tests/bean-validator/src/main/resources/application.properties
+++ b/integration-tests/bean-validator/src/main/resources/application.properties
@@ -19,3 +19,5 @@
 #
 quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
 quarkus.log.category."org.apache.camel.quarkus.component.bean.validator".level = DEBUG
+
+camel.component.bean-validator.validator-factory=#autowired
diff --git a/integration-tests/bean-validator/src/main/resources/application.properties b/integration-tests/elasticsearch-rest/src/main/resources/application.properties
similarity index 84%
copy from integration-tests/bean-validator/src/main/resources/application.properties
copy to integration-tests/elasticsearch-rest/src/main/resources/application.properties
index a603b03..d8d4ef3 100644
--- a/integration-tests/bean-validator/src/main/resources/application.properties
+++ b/integration-tests/elasticsearch-rest/src/main/resources/application.properties
@@ -14,8 +14,5 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
-quarkus.log.category."org.apache.camel.quarkus.component.bean.validator".level = DEBUG
+camel.component.elasticsearch-rest.client=#autowired
+
diff --git a/integration-tests/bean-validator/src/main/resources/application.properties b/integration-tests/infinispan/src/main/resources/application.properties
similarity index 84%
copy from integration-tests/bean-validator/src/main/resources/application.properties
copy to integration-tests/infinispan/src/main/resources/application.properties
index a603b03..ead249a 100644
--- a/integration-tests/bean-validator/src/main/resources/application.properties
+++ b/integration-tests/infinispan/src/main/resources/application.properties
@@ -14,8 +14,5 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
-quarkus.log.category."org.apache.camel.quarkus.component.bean.validator".level = DEBUG
+camel.component.infinispan.cache-container=#autowired
+
diff --git a/integration-tests/influxdb/src/main/java/org/apache/camel/quarkus/component/influxdb/it/InfluxdbResource.java b/integration-tests/influxdb/src/main/java/org/apache/camel/quarkus/component/influxdb/it/InfluxdbResource.java
index 02fea17..4d1cdb2 100644
--- a/integration-tests/influxdb/src/main/java/org/apache/camel/quarkus/component/influxdb/it/InfluxdbResource.java
+++ b/integration-tests/influxdb/src/main/java/org/apache/camel/quarkus/component/influxdb/it/InfluxdbResource.java
@@ -21,6 +21,7 @@ import java.util.stream.Collectors;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Disposes;
 import javax.inject.Inject;
+import javax.inject.Named;
 import javax.inject.Singleton;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -56,6 +57,7 @@ public class InfluxdbResource {
     @Unremovable
     @Singleton
     @javax.enterprise.inject.Produces
+    @Named(INFLUXDB_CONNECTION_NAME)
     InfluxDB createInfluxDbConnection() {
         InfluxDB influxDbConnection = InfluxDBFactory.connect(connectionUrl);
         influxDbConnection.query(new Query("CREATE DATABASE " + DB_NAME));
diff --git a/integration-tests/bean-validator/src/main/resources/application.properties b/integration-tests/messaging/src/main/resources/application.properties
similarity index 84%
copy from integration-tests/bean-validator/src/main/resources/application.properties
copy to integration-tests/messaging/src/main/resources/application.properties
index a603b03..deedf16 100644
--- a/integration-tests/bean-validator/src/main/resources/application.properties
+++ b/integration-tests/messaging/src/main/resources/application.properties
@@ -14,8 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
-quarkus.log.category."org.apache.camel.quarkus.component.bean.validator".level = DEBUG
+camel.component.sjms.connection-factory=#autowired
+camel.component.sjms2.connection-factory=#autowired
+
diff --git a/integration-tests/bean-validator/src/main/resources/application.properties b/integration-tests/twilio/src/main/resources/application.properties
similarity index 84%
copy from integration-tests/bean-validator/src/main/resources/application.properties
copy to integration-tests/twilio/src/main/resources/application.properties
index a603b03..d45ab60 100644
--- a/integration-tests/bean-validator/src/main/resources/application.properties
+++ b/integration-tests/twilio/src/main/resources/application.properties
@@ -14,8 +14,4 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-#
-# Quarkus
-#
-quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
-quarkus.log.category."org.apache.camel.quarkus.component.bean.validator".level = DEBUG
+camel.component.twilio.rest-client=#autowired