This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new ecd891c9b40 Polished
ecd891c9b40 is described below
commit ecd891c9b405451563721b675b6de22f1db8ee95
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Nov 6 20:24:56 2022 +0100
Polished
---
.../org/apache/camel/dsl/jbang/core/commands/DependencyTree.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyTree.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyTree.java
index eb262c08c60..be9b50df944 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyTree.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyTree.java
@@ -39,7 +39,7 @@ public class DependencyTree extends Export {
protected static final String EXPORT_DIR = ".camel-jbang/export";
- @CommandLine.Option(names = { "--output" }, description = "Output format
(gav or maven", defaultValue = "gav")
+ @CommandLine.Option(names = { "--output" }, description = "Output format
(gav or maven)", defaultValue = "gav")
protected String output;
public DependencyTree(CamelJBangMain main) {
@@ -48,7 +48,12 @@ public class DependencyTree extends Export {
@Override
protected Integer export() throws Exception {
- this.quiet = true; // lets be quiet and generate from fresh data to
ensure the output is up to date
+ this.quiet = true; // be quiet and generate from fresh data to ensure
the output is up-to-date
+
+ if (!"gav".equals(output) && !"maven".equals(output)) {
+ System.err.println("--output must be either gav or maven, was: " +
output);
+ return 1;
+ }
Integer answer = doExport();
if (answer == 0) {