You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/08/30 13:07:38 UTC

[camel-k] branch main updated: doc(dependencies): note on dependencies kind

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

nferraro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new b35669c  doc(dependencies): note on dependencies kind
b35669c is described below

commit b35669c369b318041d706ccaca2650ba2406430c
Author: Alexandre Fruchaud <al...@gmail.com>
AuthorDate: Mon Aug 30 12:02:33 2021 +0200

    doc(dependencies): note on dependencies kind
    
    Document the different ways to declare dependencies using the `-d` flag in the `kamel run` command.
---
 .../ROOT/pages/configuration/dependencies.adoc     | 24 +++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/configuration/dependencies.adoc b/docs/modules/ROOT/pages/configuration/dependencies.adoc
index e565a8a..0fdf0bd 100644
--- a/docs/modules/ROOT/pages/configuration/dependencies.adoc
+++ b/docs/modules/ROOT/pages/configuration/dependencies.adoc
@@ -28,6 +28,28 @@ kamel run -d mvn:com.google.guava:guava:26.0-jre -d camel-mina2 Integration.java
 
 With that command you will add a dependency of Guava and the Camel Mina component. This feature can also be disabled if needed (although we discourage you from doing it) by disabling the _dependencies_ trait (`-t dependencies.enabled=false`).
 
+[[dependencies-kind]]
+== Kind of dependencies
+
+The `-d` flag of the `kamel run` command is flexible and support multiple kind of dependencies.
+
+*Camel dependencies* can be added directly using the `-d` flag like this:
+```
+kamel run -d camel-mina2 Integration.java
+```
+In this case, the dependency will be added with the correct version.
+
+*External dependencies* can be added using the `-d` flag, the `mvn` prefix, and the maven coordinates:
+```
+kamel run -d mvn:com.google.guava:guava:26.0-jre Integration.java
+```
+Note that if your dependencies belong to a private repository, this repository needs to be defined. See link:maven.adoc[Configure maven].
+
+*Jitpack dependencies* can be added using the `-d` flag, the `github` prefix, and the project in the form `github:user/repo/version`:
+```
+kamel run -d github:apache/commons-csv/1.1 Integration.java
+```
+
 [[dependencies-dynamic]]
 == Dynamic URIs
 
@@ -43,4 +65,4 @@ from("kafka:" + myTopic + "? ... ")
 ...
 ----
 
-Here the `from` URI is dynamically created from some variables that will be resolved at runtime. In cases like this, you will need to specify the component and the related dependency to be loaded in the `Integration`.
\ No newline at end of file
+Here the `from` URI is dynamically created from some variables that will be resolved at runtime. In cases like this, you will need to specify the component and the related dependency to be loaded in the `Integration`.