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

feat(dsl): camel jbang export property #16901

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Conversation

squakez
Copy link
Contributor

@squakez squakez commented Jan 23, 2025

You can now use camel export --property xyz=abc

Closes CAMEL-21645

Description

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

@davsclaus
Copy link
Contributor

I wonder if --property should override any existing value that may already be when writing the application.properties

so if you already have hello = peter and then export with --property=hello=jack --- then the written file will a single property with jack as the value. Otherwise you have duplicates.

@squakez
Copy link
Contributor Author

squakez commented Jan 23, 2025

I wonder if --property should override any existing value that may already be when writing the application.properties

so if you already have hello = peter and then export with --property=hello=jack --- then the written file will a single property with jack as the value. Otherwise you have duplicates.

The fact is that, at that stage the application.properties is completely blank as we're exporting an app from scratch. The presence of duplicates can only happen if the user forcefully provide twice the same parameter key.

@davsclaus
Copy link
Contributor

You can export foo.java application.properties and other files together. Either explicit name the files, or use * etc

You can now use `camel export --property xyz=abc`

Closes CAMEL-21645
@squakez
Copy link
Contributor Author

squakez commented Jan 23, 2025

You can export foo.java application.properties and other files together. Either explicit name the files, or use * etc

I've tested against an export with application.properties and I think this is working correctly as it overrides the existing value since the parameter should have priority over the existing values. I created a test to validate this behavior.

@squakez squakez merged commit d8f63a8 into apache:main Jan 23, 2025
4 checks passed
@squakez squakez deleted the feat/CAMEL-21645 branch January 23, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants