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 0251063  Fix launch of camel main applications from IntelliJ
0251063 is described below

commit 02510633d87dea2310f48b1867c94059e648fd01
Author: James Netherton <[email protected]>
AuthorDate: Fri Sep 18 13:20:42 2020 +0100

    Fix launch of camel main applications from IntelliJ
    
    Fixes #1800
---
 .../apache/camel/quarkus/main/deployment/CamelMainProcessor.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/extensions-core/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainProcessor.java
 
b/extensions-core/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainProcessor.java
index 2743e60..869434d 100644
--- 
a/extensions-core/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainProcessor.java
+++ 
b/extensions-core/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainProcessor.java
@@ -28,6 +28,7 @@ import io.quarkus.deployment.annotations.Consume;
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Overridable;
 import io.quarkus.deployment.annotations.Record;
+import io.quarkus.deployment.builditem.AdditionalIndexedClassesBuildItem;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
 import io.quarkus.runtime.RuntimeValue;
 import io.quarkus.runtime.annotations.QuarkusMain;
@@ -42,6 +43,7 @@ import 
org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeTaskBuildItem;
 import org.apache.camel.quarkus.core.deployment.spi.ContainerBeansBuildItem;
 import 
org.apache.camel.quarkus.core.deployment.spi.RuntimeCamelContextCustomizerBuildItem;
 import org.apache.camel.quarkus.main.CamelMain;
+import org.apache.camel.quarkus.main.CamelMainApplication;
 import org.apache.camel.quarkus.main.CamelMainConfig;
 import org.apache.camel.quarkus.main.CamelMainProducers;
 import org.apache.camel.quarkus.main.CamelMainRecorder;
@@ -183,4 +185,10 @@ public class CamelMainProcessor {
                         camelMainConfig.shutdown.timeout.toMillis()),
                 
index.getIndex().getAnnotations(DotName.createSimple(QuarkusMain.class.getName())).isEmpty());
     }
+
+    @BuildStep
+    AdditionalIndexedClassesBuildItem indexCamelMainApplication() {
+        // Required for launching CamelMain based applications from the IDE
+        return new 
AdditionalIndexedClassesBuildItem(CamelMainApplication.class.getName());
+    }
 }

Reply via email to