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

pcongiusti 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 746e8b1  doc(jitpack): detailed info and link to example
746e8b1 is described below

commit 746e8b1a9e331f7189cf28ac993f5608d6153dbf
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri Jan 7 10:57:26 2022 +0100

    doc(jitpack): detailed info and link to example
    
    Closes #1789
---
 .../ROOT/pages/configuration/dependencies.adoc      | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/docs/modules/ROOT/pages/configuration/dependencies.adoc 
b/docs/modules/ROOT/pages/configuration/dependencies.adoc
index 3e7fc00..d7ee4b4 100644
--- a/docs/modules/ROOT/pages/configuration/dependencies.adoc
+++ b/docs/modules/ROOT/pages/configuration/dependencies.adoc
@@ -45,15 +45,28 @@ 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 xref:configuration/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`:
+[[dependencies-kind-jitpack]]
+=== Jitpack dependencies
+
+If your dependency is not published in a `maven` repository you will find very 
useful https://jitpack.io/[Jitpack] as a way to provide any custom dependency 
to your runtime Integration environment. In certain occasion you will find 
useful to include not only your route definition, but also some helper class or 
any other class which has to be used while defining the Integration behavior. 
With Jitpack you will be able to compile on the fly a java project hosted in a 
remote repository and u [...]
+
+The usage is the same as defined above for any maven dependency. It can be 
added using the `-d` flag, but, this time, you need to define the prefix as 
expected for the project repository you are using (ie, `github`). It has to be 
provided in the form `repository-kind:user/repo/version`. As an example, you 
can provide the Apache Commons CSV dependency by executing:
+
 ```
 kamel run -d github:apache/commons-csv/1.1 Integration.java
 ```
-If you use some other codebase with jitpack, f.e. bitbucket, just change the 
prefix, followed by your repo-path from jitpack
+
+We support the most important public code repositories:
+
 ```
-kamel run -d bitbucket:workspace/repo/[tag|branch|snapshot]
+github:user/repo/version
+gitlab:user/repo/version
+bitbucket:user/repo/version
+gitee:user/repo/version
+azure:user/repo/version
 ```
-NOTE: works with other's too (gitlab, gitee, azure...)
+
+The `version` can be omitted when you are willing to use the `main` branch. 
Otherwise it will represent the branch or tag used in the project repo. You can 
have a look at the 
https://github.com/apache/camel-k/tree/main/examples/jitpack[Camel K Jitpack 
example] to have a complete experience about how to include a dependency with 
this mechanism.
 
 [[dependencies-dynamic]]
 == Dynamic URIs

Reply via email to