[GitHub] [camel-quarkus] ppalaga opened a new pull request #2184: Freemarker native support

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga opened a new pull request #2184: Freemarker native support

GitBox

ppalaga opened a new pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184


   Fix #223


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #2184: Freemarker native support

GitBox

jamesnetherton commented on a change in pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#discussion_r567824292



##########
File path: extensions/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerProcessor.java
##########
@@ -16,31 +16,31 @@
  */
 package org.apache.camel.quarkus.component.freemarker.deployment;
 
+import io.quarkus.arc.deployment.BeanContainerBuildItem;
 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.jboss.logging.Logger;
+import org.apache.camel.component.freemarker.FreemarkerComponent;
+import org.apache.camel.quarkus.component.freemarker.CamelFreemarkerRecorder;
+import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 
 class FreemarkerProcessor {
 
-    private static final Logger LOG = Logger.getLogger(FreemarkerProcessor.class);
     private static final String FEATURE = "camel-freemarker";
 
     @BuildStep
     FeatureBuildItem feature() {
         return new FeatureBuildItem(FEATURE);
     }
 
-    /**
-     * Remove this once this extension starts supporting the native mode.
-     */
-    @BuildStep(onlyIf = NativeBuild.class)
-    @Record(value = ExecutionTime.RUNTIME_INIT)
-    void warnJvmInNative(JvmOnlyRecorder recorder) {
-        JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
-        recorder.warnJvmInNative(FEATURE); // warn at runtime
+    @Record(ExecutionTime.RUNTIME_INIT)
+    @BuildStep
+    CamelRuntimeBeanBuildItem quteComponent(CamelFreemarkerRecorder recorder, BeanContainerBuildItem beanContainer) {
+        // set the "real" Qute engine to the Camel Qute component
+        return new CamelRuntimeBeanBuildItem(
+                "qute",

Review comment:
       Qute?

##########
File path: integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTest.java
##########
@@ -17,14 +17,13 @@
 package org.apache.camel.quarkus.component.activemq.it;
 
 import io.quarkus.test.common.QuarkusTestResource;
-import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.core.Is.is;
 
-@QuarkusTest
+//@QuarkusTest

Review comment:
       I guess this wasn't supposed to be committed?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on a change in pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#discussion_r567848315



##########
File path: extensions/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerProcessor.java
##########
@@ -16,31 +16,31 @@
  */
 package org.apache.camel.quarkus.component.freemarker.deployment;
 
+import io.quarkus.arc.deployment.BeanContainerBuildItem;
 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.jboss.logging.Logger;
+import org.apache.camel.component.freemarker.FreemarkerComponent;
+import org.apache.camel.quarkus.component.freemarker.CamelFreemarkerRecorder;
+import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 
 class FreemarkerProcessor {
 
-    private static final Logger LOG = Logger.getLogger(FreemarkerProcessor.class);
     private static final String FEATURE = "camel-freemarker";
 
     @BuildStep
     FeatureBuildItem feature() {
         return new FeatureBuildItem(FEATURE);
     }
 
-    /**
-     * Remove this once this extension starts supporting the native mode.
-     */
-    @BuildStep(onlyIf = NativeBuild.class)
-    @Record(value = ExecutionTime.RUNTIME_INIT)
-    void warnJvmInNative(JvmOnlyRecorder recorder) {
-        JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
-        recorder.warnJvmInNative(FEATURE); // warn at runtime
+    @Record(ExecutionTime.RUNTIME_INIT)
+    @BuildStep
+    CamelRuntimeBeanBuildItem quteComponent(CamelFreemarkerRecorder recorder, BeanContainerBuildItem beanContainer) {
+        // set the "real" Qute engine to the Camel Qute component
+        return new CamelRuntimeBeanBuildItem(
+                "qute",

Review comment:
       Uh oh?!?!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on a change in pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#discussion_r567905482



##########
File path: integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTest.java
##########
@@ -17,14 +17,13 @@
 package org.apache.camel.quarkus.component.activemq.it;
 
 import io.quarkus.test.common.QuarkusTestResource;
-import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.core.Is.is;
 
-@QuarkusTest
+//@QuarkusTest

Review comment:
       Nope, thanks for catching it!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-770935520


   7feca462912f079b6532a5701c38ed64b82fac2f: fixed the two comments by @jamesnetherton


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-770950505


   > Sorry to nitpick. The method name is still `quteComponent`. Fix up in a future commit if you don't want to burn CI cycles. Otherwise, LGTM.
   
   So sorry to steel your time. Fixed in a534277 Thanks again!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga edited a comment on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga edited a comment on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-770950505


   > Sorry to nitpick. The method name is still `quteComponent`. Fix up in a future commit if you don't want to burn CI cycles. Otherwise, LGTM.
   
   So sorry to steal your time. Fixed in a534277 Thanks again!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-771188168


   The test is failing because I forgot that a couple of weeks ago, I hacked around some limitations in Quarkiverse Freemarker and I need to get them merged there first. I am getting old :-/


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-780667316


   Waiting for freemarker-quarkus 0.2.0


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-781637369


   Quarkiverse Freemarker 0.2.0 is available on the Central


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga commented on pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184#issuecomment-784063267


   2e637a8: upgraded to Quarkiverse Freemarker 0.2.2


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga merged pull request #2184: Freemarker native support

GitBox
In reply to this post by GitBox

ppalaga merged pull request #2184:
URL: https://github.com/apache/camel-quarkus/pull/2184


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]