You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/12/22 10:56:48 UTC

[GitHub] [camel] Croway edited a comment on pull request #6583: CAMEL-17345: camel-jbang create maven project

Croway edited a comment on pull request #6583:
URL: https://github.com/apache/camel/pull/6583#issuecomment-999466994


   Hi @oscerd, @davsclaus , the generator can be used like this:
   ```
   jbang -Dcamel.jbang.version=3.15.0-SNAPSHOT CamelJBang@apache/camel create-project TimerRoute.java test.yaml --quarkus-dependency=camel-quarkus-timer,camel-quarkus-log,camel-quarkus-yaml-dsl,camel-quarkus-http --name=TestProject
   ```
   where
   TimerRoute.java
   ```
   package org.acme.timer.log;
   
   import org.apache.camel.builder.RouteBuilder;
   
   public class TimerRoute extends RouteBuilder {
   
       @Override
       public void configure() throws Exception {
           from("timer:foo?period=1000").log("Hello World");
       }
   }
   ```
   and test.yaml
   ```
   - from:
       uri: "timer:tick"
       parameters:
         period: "5000"
       steps:
       - to: "https://random-data-api.com/api/cannabis/random_cannabis"
       - to: "log:info?showStreams=true"
   ```
   the resulting project is:
   ![image](https://user-images.githubusercontent.com/34543311/147078773-3826d5f0-fedb-483d-b7ff-02a52c7cd742.png)
   
   with the given routes and `--quarkus-dependency=...` it is working as expected.
   
   wdyt?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org