You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "christophd (via GitHub)" <gi...@apache.org> on 2024/03/22 15:50:27 UTC

[PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

christophd opened a new pull request, #13593:
URL: https://github.com/apache/camel/pull/13593

   # Description
   
   CAMEL-20602
   
   - Allow to specify properties on source, sink, step in a Pipe
   - User properties can be set as additional command options targeting either the source or the sink or a specific step
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (note that Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
   
   See CAMEL-20602
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful subject line and body.
   
   <!--
   If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   -->
   
   - [x] I have run `mvn clean install -DskipTests` locally and I have committed all auto-generated changes
   
   <!--
   You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
   
   You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->


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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on code in PR #13593:
URL: https://github.com/apache/camel/pull/13593#discussion_r1535835583


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },

Review Comment:
   I was copying this from Run command: https://github.com/apache/camel/blob/main/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java#L235



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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on code in PR #13593:
URL: https://github.com/apache/camel/pull/13593#discussion_r1535859398


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },

Review Comment:
   done



##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },
+                        description = "Adds a pipe property in the form of [source|sink|step-<n>].<key>=<value> where <n> is the step number starting from 1",
+                        arity = "0")
+    String[] properties;
+
+    @CommandLine.Option(names = { "--output", "-o" },

Review Comment:
   done, thx



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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #13593:
URL: https://github.com/apache/camel/pull/13593#discussion_r1535840214


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },

Review Comment:
   Ah yeah we should have that changed now after the 4.4 LTS so it can be consistent. You are welcome to fix that as well. Maybe in another PR and add a note in the upgrade guide 4.x



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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #13593:
URL: https://github.com/apache/camel/pull/13593#discussion_r1535820983


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },

Review Comment:
   We only use a single and double slash for the commands in camel-jbang



##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },
+                        description = "Adds a pipe property in the form of [source|sink|step-<n>].<key>=<value> where <n> is the step number starting from 1",
+                        arity = "0")
+    String[] properties;
+
+    @CommandLine.Option(names = { "--output", "-o" },

Review Comment:
   same here



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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on code in PR #13593:
URL: https://github.com/apache/camel/pull/13593#discussion_r1535847698


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },

Review Comment:
   so to be sure it is about removing the `-p` option, right? I can do that for the new options in this PR already, np



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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd merged PR #13593:
URL: https://github.com/apache/camel/pull/13593


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


Re: [PR] CAMEL-20602: Support user properties on Camel JBang bind command [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #13593:
URL: https://github.com/apache/camel/pull/13593#discussion_r1535850551


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java:
##########
@@ -64,21 +71,51 @@ public class Bind extends CamelCommand {
                         required = true)
     String sink;
 
+    @CommandLine.Option(names = { "-p", "--prop", "--property" },

Review Comment:
   yeah



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