Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI parameter does not overwrite application.properties #2538

Closed
christophd opened this issue Jul 30, 2021 · 1 comment · Fixed by #2570
Closed

CLI parameter does not overwrite application.properties #2538

christophd opened this issue Jul 30, 2021 · 1 comment · Fixed by #2570
Assignees
Labels
area/cli Kamel CLI

Comments

@christophd
Copy link
Contributor

Some Camel-K integration uses a modeline to define a property file like this

// camel-k: language=java property=file:application.properties

Properties defined as CLI parameters on kamel run should be able to overwrite these properties

kamel run Foo.java -p foo.bar=something

So foo.bar property in application.properties should be overwritten. This is not working as expected with Camel-K 1.5.0.

@squakez squakez self-assigned this Aug 9, 2021
@squakez squakez added area/cli Kamel CLI kind/bug Something isn't working and removed kind/bug Something isn't working labels Aug 9, 2021
@squakez
Copy link
Contributor

squakez commented Aug 11, 2021

I've analyzed it and it's not really a bug as the modeline just convert the configuration into a full kamel run command. The real problem is that we don't consider precedence of a single property over a file properties. I think that by including it we will also fix the problem described in this issue.

squakez added a commit to squakez/camel-k that referenced this issue Aug 12, 2021
Introduced a merge function which is in charge to merge all properties, giving priority to single declaration property options

Closes apache#2538
squakez added a commit that referenced this issue Aug 23, 2021
Introduced a merge function which is in charge to merge all properties, giving priority to single declaration property options

Closes #2538
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Kamel CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants