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/11/24 01:38:50 UTC

[GitHub] [camel-k] scodeman commented on issue #2776: Error: unknown flag: --trait on local build

scodeman commented on issue #2776:
URL: https://github.com/apache/camel-k/issues/2776#issuecomment-977381236


   Note that the dry-run (cf:#2769) ``` kamel run IntegrationFile.java -o yaml```  call works as expected providing me the following output
   ```
   Modeline options have been loaded from source files
   Full command: kamel run IntegrationFile.java -o yaml --trait=container.image=localhost:5000/integration-base-image:latest 
   ```
   ```yaml
   apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
     creationTimestamp: null
     name: integration-file
     namespace: default
   spec:
     sources:
     - content: |
         // camel-k: language=java
         // camel-k: trait=container.image=localhost:5000/integration-base-image:latest
   
         import org.apache.camel.builder.RouteBuilder;
   
         public class IntegrationFile extends RouteBuilder {
           @Override
           public void configure() throws Exception {
   
               // Write your routes here, for example:
               from("timer:java?period=1000")
                 .routeId("java")
                 .setBody()
                   .simple("Hello Camel K from ${routeId}")
                 .to("log:info");
   
           }
         }
       name: IntegrationFile.java
     traits:
       container:
         configuration:
           image: localhost:5000/integration-base-image:latest
   status: {}
   ```


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