You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "squakez (via GitHub)" <gi...@apache.org> on 2023/03/13 08:54:55 UTC

[GitHub] [camel-k] squakez commented on issue #4126: Bring an option to force an image build to the kamel run command

squakez commented on issue #4126:
URL: https://github.com/apache/camel-k/issues/4126#issuecomment-1465738335

   Hello. Indeed, the way Camel K is designed is to avoid rebuilding stuff when they are not needed. The reason is the fact we want to have a cloud native experience, so, a fast deploy is a must. The behavior you've described is correct, because the resource you're providing is a runtime resource, so, a rebuild is not needed. This should also be the case in Quarkus native mode. I guess there may be some bug here that requires some attention.
   
   You can force the rebuild of your application by applying a simple workaround. Use a build time properties that everytime is different. I have one handy for this case `kamel run --build-property=quarkus.application.name=integrationTwo`.
   
   However, in this case you can have a better design I think, making your route to depend on a generic file [1]:
   ```
   .setBody().constant("resource:file:/tmp/integration.json");
   ```
   then, you can use the destination path for the resource such as `--resource file:resources_one.json@/tmp/integration.json`
   
   [1] https://camel.apache.org/camel-k/next/configuration/runtime-resources.html#runtime-resource-path


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