You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/10/05 14:43:01 UTC

[camel-quarkus] 02/02: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.() #1840

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

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

commit bddf33b2803a22625c954783de85c2efcbe00310
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Mon Oct 5 14:26:26 2020 +0200

    NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.<init>() #1840
---
 .../component/lra/deployment/LraProcessor.java      |  8 ++++++++
 .../src/main/resources/application.properties       | 21 ---------------------
 2 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/extensions-jvm/lra/deployment/src/main/java/org/apache/camel/quarkus/component/lra/deployment/LraProcessor.java b/extensions-jvm/lra/deployment/src/main/java/org/apache/camel/quarkus/component/lra/deployment/LraProcessor.java
index 109978b..f463bd4 100644
--- a/extensions-jvm/lra/deployment/src/main/java/org/apache/camel/quarkus/component/lra/deployment/LraProcessor.java
+++ b/extensions-jvm/lra/deployment/src/main/java/org/apache/camel/quarkus/component/lra/deployment/LraProcessor.java
@@ -16,12 +16,15 @@
  */
 package org.apache.camel.quarkus.component.lra.deployment;
 
+import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.pkg.steps.NativeBuild;
 import org.apache.camel.quarkus.core.JvmOnlyRecorder;
+import org.apache.camel.quarkus.core.deployment.spi.RoutesBuilderClassExcludeBuildItem;
+import org.apache.camel.service.lra.LRASagaRoutes;
 import org.jboss.logging.Logger;
 
 class LraProcessor {
@@ -43,4 +46,9 @@ class LraProcessor {
         JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
         recorder.warnJvmInNative(FEATURE); // warn at runtime
     }
+
+    @BuildStep
+    void excludeLraRoutes(BuildProducer<RoutesBuilderClassExcludeBuildItem> routesBuilderClassExcludes) {
+        routesBuilderClassExcludes.produce(RoutesBuilderClassExcludeBuildItem.ofClass(LRASagaRoutes.class));
+    }
 }
diff --git a/extensions-jvm/lra/integration-test/src/main/resources/application.properties b/extensions-jvm/lra/integration-test/src/main/resources/application.properties
deleted file mode 100644
index 75a4820..0000000
--- a/extensions-jvm/lra/integration-test/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.
-## ---------------------------------------------------------------------------
-
-#
-# A dirty workaround for https://github.com/apache/camel-quarkus/issues/1840
-#
-quarkus.camel.routes-discovery.exclude-patterns = org/apache/camel/service/lra/LRASagaRoutes