You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/11/10 06:35:48 UTC

[camel] branch main updated (3113d031236 -> 609fe4c496d)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 3113d031236 CAMEL-18608: camel-core - Fix the FileProducerCharsetUTF tests
     new 6c4d2d0aac5 camel-jbang - Polished maven settings options
     new 609fe4c496d camel-jbang - Update docs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../modules/ROOT/pages/camel-jbang.adoc            | 24 ++++++++++++++++------
 .../apache/camel/dsl/jbang/core/commands/Run.java  |  6 ++++--
 2 files changed, 22 insertions(+), 8 deletions(-)


[camel] 01/02: camel-jbang - Polished maven settings options

Posted by da...@apache.org.
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

commit 6c4d2d0aac5a626bc57056bfb95e3219a4aead37
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Nov 10 07:30:28 2022 +0100

    camel-jbang - Polished maven settings options
---
 docs/user-manual/modules/ROOT/pages/camel-jbang.adoc          | 11 +++++++----
 .../java/org/apache/camel/dsl/jbang/core/commands/Run.java    |  6 ++++--
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index f595ce268fe..f4c2df60ec5 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -226,7 +226,7 @@ Camel will download these JARs in the following order:
 2. from internet in Maven Central
 3. from internet in custom 3rd-party Maven repositories
 4. from all the repositories found in active profiles of `~/.m2/settings.xml` or a settings file specified using
-`--settings` option.
+`--maven-settings` option.
 
 If you do not want Camel JBang to download over the internet, you can turn this off with `--download`, as shown below:
 
@@ -317,6 +317,7 @@ encrypted) or active profiles and additional repositories.
 
 Maven repositories can use authentication and the Maven-way to configure credentials is through `<server>` elements,
 like this:
+
 [source,xml]
 ----
 <server>
@@ -338,6 +339,7 @@ Master password: camel
 ----
 
 The above password should be added to `~/.m2/settings-security.xml` file like this:
+
 [source,xml]
 ----
 <settingsSecurity>
@@ -346,6 +348,7 @@ The above password should be added to `~/.m2/settings-security.xml` file like th
 ----
 
 Then a normal password can be configured like this:
+
 [source,bash]
 ----
 $ mvn -ep
@@ -354,21 +357,21 @@ Password: camel
 {SSVqy/PexxQHvubrWhdguYuG7HnTvHlaNr6g3dJn7nk=}
 ----
 
-Finally such password can be used in `<server>/<password>` configuration.
+Finally, such password can be used in `<server>/<password>` configuration.
 
 By default, Maven reads the master password from `~/.m2/settings-security.xml` file, but we can override it.
 Location of the settings.xml file itself can be specified as well:
 
 [source,bash]
 ----
-camel run foo.java --settings=/path/to/settings.xml --settings-security=/path/to/settings-security.xml
+camel run foo.java --maven-settings=/path/to/settings.xml --maven-settings-security=/path/to/settings-security.xml
 ----
 
 If you want to run Camel application without assuming any location (even `~/.m2/settings.xml`), use this option:
 
 [source,bash]
 ----
-camel run foo.java --settings=false
+camel run foo.java --maven-settings=false
 ----
 
 
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index aede235c11d..dfccbb856ff 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -104,11 +104,11 @@ class Run extends CamelCommand {
     @Option(names = {"--repos"}, description = "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)")
     String repos;
 
-    @Option(names = {"--settings"}, description = "Optional location of maven setting.xml file to configure servers, repositories, mirrors and proxies." +
+    @Option(names = {"--maven-settings"}, description = "Optional location of maven setting.xml file to configure servers, repositories, mirrors and proxies." +
             " If set to \"false\", not even the default ~/.m2/settings.xml will be used.")
     String mavenSettings;
 
-    @Option(names = {"--settings-security"}, description = "Optional location of maven settings-security.xml file to decrypt settings.xml")
+    @Option(names = {"--maven-settings-security"}, description = "Optional location of maven settings-security.xml file to decrypt settings.xml")
     String mavenSettingsSecurity;
 
     @Option(names = { "--fresh" }, description = "Make sure we use fresh (i.e. non-cached) resources")
@@ -274,6 +274,8 @@ class Run extends CamelCommand {
                 propertiesFiles = propertiesFiles + ",file:" + profilePropertiesFile.getName();
             }
             repos = profileProperties.getProperty("camel.jbang.repos", repos);
+            mavenSettings = profileProperties.getProperty("camel.jbang.maven-settings", mavenSettings);
+            mavenSettingsSecurity = profileProperties.getProperty("camel.jbang.maven-settings-security", mavenSettingsSecurity);
             openapi = profileProperties.getProperty("camel.jbang.openApi", openapi);
             download = "true".equals(profileProperties.getProperty("camel.jbang.download", download ? "true" : "false"));
         }


[camel] 02/02: camel-jbang - Update docs

Posted by da...@apache.org.
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

commit 609fe4c496d134617ade8b1a163049f41ab6ec04
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Nov 10 07:35:10 2022 +0100

    camel-jbang - Update docs
---
 docs/user-manual/modules/ROOT/pages/camel-jbang.adoc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index f4c2df60ec5..ddf39882ca6 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -1575,8 +1575,17 @@ The follow options related to _exporting_, can be configured in `application.pro
 |`camel.jbang.gradleWrapper`
 |Include Gradle Wrapper files in exported project
 
-|`camel.jbang.project`
-|Project (either maven or gradle)
+|`camel.jbang.buildTool`
+|Build tool to use (maven or gradle)
+
+|`camel.jbang.repos`
+|Additional maven repositories for download on-demand (Use commas to separate multiple repositories)
+
+|`camel.jbang.mavenSettings`
+|Optional location of maven setting.xml file to configure servers, repositories, mirrors and proxies. If set to false, not even the default ~/.m2/settings.xml will be used.
+
+|`camel.jbang.mavenSettingsSecurity`
+|Optional location of maven settings-security.xml file to decrypt settings.xml
 
 |`camel.jbang.exportDir`
 |Directory where the project will be exported