[ 
https://issues.apache.org/jira/browse/CAMEL-23137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18063418#comment-18063418
 ] 

Claus Ibsen commented on CAMEL-23137:
-------------------------------------

exporting from a maven project is NOT really supported. jbang is for flat file 
structures or non maven projects. 

So if you export like you do, then you need to include 
src/main/resource/application.properties if you want to include this file as 
well, something ala
{code:java}
camel export \
    --runtime=quarkus \
    --gav=org.apache.camel.example:qdrant-rag-quarkus:1.0.0 \
    --directory=./export-quarkus-test \
    src/main/resources/qdrant-rag.yaml \
    src/main/resources/application.properties {code}
 

> camel-jbang - Export loses application.properties when source files use Maven 
> project layout
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23137
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23137
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.18.0
>            Reporter: Salvatore Mongiardo
>            Priority: Major
>
> When exporting a Camel application using {{{}camel export{}}}, the 
> {{application.properties}} file content is silently lost if the source 
> project uses the standard Maven project layout 
> ({{{}src/main/resources/application.properties{}}}) instead of having it at 
> the project root.
> This affects all runtimes: Spring Boot, Quarkus, and Camel Main.
> *How to reproduce:*
> Given a project with the following structure:
> {code:java}
> project/
> ├── src/main/resources/
> │   ├── application.properties    <-- contains configuration
> │   └── qdrant-rag.yaml
> {code}
> Running:
> {code:java}
> camel export \
>     --runtime=quarkus \
>     --gav=org.apache.camel.example:qdrant-rag-quarkus:1.0.0 \
>     --directory=./export-quarkus-test \
>     src/main/resources/qdrant-rag.yaml
> {code}
> The export completes successfully (no errors), but the exported 
> {{application.properties}} is {*}empty{*}. All configuration is silently lost.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to