This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/asf-site by this push:
new d3a05da Updated site at revision 1ed7891
d3a05da is described below
commit d3a05dac9c643683bfde27f28ae7daa90043fb47
Author: jenkins <[email protected]>
AuthorDate: Sat Dec 30 03:01:34 2017 +0000
Updated site at revision 1ed7891
---
content/docs/latest/api/ledger-api/index.html | 63 +++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/content/docs/latest/api/ledger-api/index.html
b/content/docs/latest/api/ledger-api/index.html
index ab97282..5b89fa5 100644
--- a/content/docs/latest/api/ledger-api/index.html
+++ b/content/docs/latest/api/ledger-api/index.html
@@ -479,6 +479,51 @@
</code></pre>
</div>
+<p>BookKeeper uses google <a
href="https://github.com/google/protobuf/tree/master/java">protobuf</a> and <a
href="https://github.com/google/guava">guava</a> libraries
+a lot. If your application might include different versions of protobuf or
guava introduced by other dependencies, you can choose to use the
+shaded library, which relocate classes of protobuf and guava into a different
namespace to avoid conflicts.</p>
+
+<p>You can use the shaded artifact of <code
class="highlighter-rouge">bookkeeper-server</code>. Please note that <a
href="https://maven.apache.org/plugins/maven-shade-plugin">maven-shade-plugin</a>
doesn’t generate
+a dependency-reduced pom file for shaded artifact using <a
href="https://maven.apache.org/plugins/maven-shade-plugin/examples/attached-artifact.html">shadedArtifactAttached</a>.
You need to manually to exclude relocated packages when using the shaded
artifact. Full example of how to use this is
+showed as below.</p>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span
class="c"><!-- in your <properties> block --></span>
+<span class="nt"><bookkeeper.version></span>4.7.0-SNAPSHOT<span
class="nt"></bookkeeper.version></span>
+
+<span class="c"><!-- in your <dependencies> block --></span>
+<span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.bookkeeper<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>bookkeeper-server<span
class="nt"></artifactId></span>
+ <span class="nt"><version></span>${bookkeeper.version}<span
class="nt"></version></span>
+ <span class="nt"><classifier></span>shaded<span
class="nt"></classifier></span> <span class="c"><!-- specify "shaded"
classifier to use shaded artifact --></span>
+ <span class="nt"><exclusions></span>
+ <span class="nt"><exclusion></span>
+ <span class="nt"><groupId></span>org.apache.bookkeeper<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>bookkeeper-common<span
class="nt"></artifactId></span>
+ <span class="nt"></exclusion></span>
+ <span class="nt"><exclusion></span>
+ <span class="nt"><groupId></span>org.apache.bookkeeper<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>bookkeeper-proto<span
class="nt"></artifactId></span>
+ <span class="nt"></exclusion></span>
+ <span class="nt"></exclusions></span>
+<span class="nt"></dependency></span>
+</code></pre>
+</div>
+
+<p>Or you can use a separate shaded artifact <code
class="highlighter-rouge">bookkeeper-server-shaded</code>.</p>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span
class="c"><!-- in your <properties> block --></span>
+<span class="nt"><bookkeeper.version></span>4.7.0-SNAPSHOT<span
class="nt"></bookkeeper.version></span>
+
+<span class="c"><!-- in your <dependencies> block --></span>
+<span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.bookkeeper<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>bookkeeper-server-shaded<span
class="nt"></artifactId></span>
+ <span class="nt"><version></span>${bookkeeper.version}<span
class="nt"></version></span>
+<span class="nt"></dependency></span>
+</code></pre>
+</div>
+
<h3 id="gradle">Gradle</h3>
<p>If you’re using <a href="https://gradle.org/">Gradle</a>, add this to your
<a href="https://spring.io/guides/gs/gradle/"><code
class="highlighter-rouge">build.gradle</code></a> build configuration file:</p>
@@ -494,6 +539,24 @@
</code></pre>
</div>
+<p>Similarly as using maven, you can also configure to use the shaded jars.</p>
+
+<div class="language-groovy highlighter-rouge"><pre
class="highlight"><code><span class="c1">// use the shaded artifact of
`bookkeeper-server` jar</span>
+<span class="n">dependencies</span> <span class="o">{</span>
+ <span class="n">compile</span> <span class="o">(</span><span
class="s1">'org.apache.bookkeeper:bookkeeper-server::shaded'</span><span
class="o">)</span> <span class="o">{</span>
+ <span class="n">exclude</span> <span class="nl">group:</span> <span
class="s1">'org.apache.bookkeeper'</span><span class="o">,</span> <span
class="nl">module:</span> <span class="err">"</span><span
class="n">bookkeeper</span><span class="o">-</span><span
class="n">common</span><span class="err">'</span>
+ <span class="n">exclude</span> <span class="nl">group:</span> <span
class="s1">'org.apache.bookkeeper'</span><span class="o">,</span> <span
class="nl">module:</span> <span class="s1">'bookkeeper-proto'</span>
+ <span class="o">}</span>
+<span class="o">}</span>
+
+
+<span class="c1">// use the `bookkeeper-server-shaded` jar</span>
+<span class="n">dependencies</span> <span class="o">{</span>
+ <span class="n">compile</span> <span
class="s1">'org.apache.bookkeeper:bookkeeper-server-shaded:'</span>
+<span class="o">}</span>
+</code></pre>
+</div>
+
<h2 id="connection-string">Connection string</h2>
<p>When interacting with BookKeeper using the Java client, you need to provide
your client with a connection string, for which you have three options:</p>
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].