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/06/07 08:22:33 UTC

[camel] 02/03: CAMEL-18079: camel-jbang - Add support for 3rd party maven repositories

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 e3a51323c3bd990790e859771d7fd6650898e8f7
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jun 7 10:19:57 2022 +0200

    CAMEL-18079: camel-jbang - Add support for 3rd party maven repositories
---
 .../modules/ROOT/pages/camel-jbang.adoc            | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index 2c33751fc22..60d06c6a2ab 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -155,6 +155,52 @@ And you can also configure Camel components such as camel-kafka to declare the U
 camel.component.kafka.brokers=broker1:9092,broker2:9092,broker3:9092
 ----
 
+
+=== Using 3rd-party Maven repositories
+
+Camel JBang will download from local repository first, and then online from Maven Central.
+To be able to download from 3rd-party Maven repositories then you need to specify this as CLI argument,
+]or in `application.properties`
+
+[source,bash]
+----
+camel run foo.java --repos=https://packages.atlassian.com/maven-external
+----
+
+TIP: Multiple repositories can be separated by comma
+
+The configuration for the 3rd-party Maven repositories can also be configured in `application.properties`
+with the key `camel.jbang.repos` as shown:
+
+[source,properties]
+----
+camel.jbang.repos=https://packages.atlassian.com/maven-external
+----
+
+And when running Camel then `application.properties` is automatically loaded:
+
+[source,bash]
+----
+camel run foo.java
+----
+
+However, you can also explicit specify the properties file to use:
+
+[source,bash]
+----
+camel run foo.java application.properties
+----
+
+And even better if you specify this as a profile:
+
+[source,bash]
+----
+camel run foo.java --profile=application
+----
+
+Where the profile id is the name of the properties file.
+
+
 === Running routes hosted on GitHub
 
 You can run a route that is hosted on GitHub using Camels xref:components:others:resourceresolver-github.adoc[github] resource loader.