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

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 56415149296 Publishing website 2023/11/22 23:37:01 at commit 2a20b09
56415149296 is described below

commit 564151492962bae5a9bc13b36ceced6b5cf79fa9
Author: runner <runner@main-runner-zt478-d9r2b>
AuthorDate: Wed Nov 22 23:37:02 2023 +0000

    Publishing website 2023/11/22 23:37:01 at commit 2a20b09
---
 .../sdks/java-dependencies/index.html              | 62 +++++++++++++++++++---
 website/generated-content/sitemap.xml              |  2 +-
 2 files changed, 56 insertions(+), 8 deletions(-)

diff --git 
a/website/generated-content/documentation/sdks/java-dependencies/index.html 
b/website/generated-content/documentation/sdks/java-dependencies/index.html
index f1a7d990ca5..41c67d54444 100644
--- a/website/generated-content/documentation/sdks/java-dependencies/index.html
+++ b/website/generated-content/documentation/sdks/java-dependencies/index.html
@@ -36,12 +36,22 @@
 <img class=banner-img-mobile 
src=/images/banners/tour-of-beam/tour-of-beam-mobile.png alt="Start Tour of 
Beam"></a></div><div class=swiper-slide><a 
href=https://beam.apache.org/documentation/ml/overview/><img 
class=banner-img-desktop 
src=/images/banners/machine-learning/machine-learning-desktop.jpg alt="Machine 
Learning">
 <img class=banner-img-mobile 
src=/images/banners/machine-learning/machine-learning-mobile.jpg alt="Machine 
Learning"></a></div></div><div class=swiper-pagination></div></div><script 
src=/js/swiper-bundle.min.min.e0e8f81b0b15728d35ff73c07f42ddbb17a108d6f23df4953cb3e60df7ade675.js></script>
 <script 
src=/js/sliders/top-banners.min.91104c476b3d8123ebee5ed9a8168556ec546abb698549551b38a0cee187ee1c.js></script>
-<script>function showSearch(){addPlaceholder();var 
e,t=document.querySelector(".searchBar");t.classList.remove("disappear"),e=document.querySelector("#iconsBar"),e.classList.add("disappear")}function
 addPlaceholder(){$("input:text").attr("placeholder","What are you looking 
for?")}function endSearch(){var 
e,t=document.querySelector(".searchBar");t.classList.add("disappear"),e=document.querySelector("#iconsBar"),e.classList.remove("disappear")}function
 blockScroll(){$("body").toggleClass(" [...]
-import additional dependencies. Version collisions can result in unexpected
-behavior in the service. If you are using any of these packages in your code, 
be
-aware that some libraries are not forward-compatible and you may need to pin to
-the listed versions that will be in scope during execution.</p><p>Compile and 
runtime dependencies for your Beam SDK version are listed in 
<code>BeamModulePlugin.groovy</code> in the Beam repository. To view them, 
perform the following steps:</p><ol><li><p>Open 
<code>BeamModulePlugin.groovy</code>.</p><pre 
tabindex=0><code>https://raw.githubusercontent.com/apache/beam/v&lt;VERSION_NUMBER&gt;/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
-</code></pre><p class=paragraph-wrap>Replace `&lt;VERSION_NUMBER>` with the 
major.minor.patch version of the SDK. For example, <a 
href=https://raw.githubusercontent.com/apache/beam/v2.52.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
 target=_blank rel="noopener 
noreferrer">https://raw.githubusercontent.com/apache/beam/v2.52.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy</a>
 will provide the dependencies for the 2.52.0 release.</p></li [...]
+<script>function showSearch(){addPlaceholder();var 
e,t=document.querySelector(".searchBar");t.classList.remove("disappear"),e=document.querySelector("#iconsBar"),e.classList.add("disappear")}function
 addPlaceholder(){$("input:text").attr("placeholder","What are you looking 
for?")}function endSearch(){var 
e,t=document.querySelector(".searchBar");t.classList.add("disappear"),e=document.querySelector("#iconsBar"),e.classList.remove("disappear")}function
 blockScroll(){$("body").toggleClass(" [...]
+import additional dependencies. You need to manage your dependencies for the 
following reasons:</p><ul><li>Dependencies might have version collisions or 
incompatible classes and libraries.</li><li>Some libraries are not forward 
compatible. When you use these packages in your code,
+you might need to pin to the appropriate versions so that those versions are 
used
+when you run your pipeline.</li></ul><p>When problems occur with dependencies, 
you might see unexpected behavior in the service,
+including errors such as <code>NoClassDefFoundError</code>, 
<code>NoSuchMethodError</code>, <code>NoSuchFieldError</code>,
+or <code>FATAL ERROR in native method</code>.</p><p>This page explains how to 
view the dependencies that your SDK is using and how to manage your
+dependencies to avoid issues.</p><h2 id=view-dependencies>View 
dependencies</h2><p>To view your dependencies, either use the
+<code>BeamModulePlugin.groovy</code> file or retrieve the list by creating a 
new project
+through Maven and resolving the dependencies.</p><h3 
id=use-beammoduleplugingroovy-to-retrieve-dependencies>Use 
BeamModulePlugin.groovy to retrieve dependencies</h3><p>The 
<code>BeamModulePlugin.groovy</code> file in the Beam repository lists compile 
and runtime
+dependencies for your Beam SDK version.</p><ol><li><p>Use the following link 
to open the <code>BeamModulePlugin.groovy</code> file.</p><pre 
tabindex=0><code>https://raw.githubusercontent.com/apache/beam/vBEAM_VERSION/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+</code></pre><p class=paragraph-wrap>Replace <em>BEAM_VERSION</em> with the 
SDK version
+that you're using. The following example provides the dependencies for the
+2.52.0 release: <a 
href=https://raw.githubusercontent.com/apache/beam/v2.52.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
 target=_blank rel="noopener 
noreferrer">https://raw.githubusercontent.com/apache/beam/v2.52.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy</a>.</p></li><li><p>Under
 <code>project.ext.library</code>, review the list of dependencies. Some 
dependencies in the
+list use version variables, such as 
<code>google_cloud_bigdataoss_version</code>. These variables are
+defined before the <code>project.ext.library</code> map 
definition.</p></li></ol><h3 id=use-a-maven-project-to-resolve-dependencies>Use 
a Maven project to resolve dependencies</h3><p>You can retrieve the list of 
dependencies by creating a new project through Maven and
+then resolving the dependencies.</p><ol><li><p>In your terminal or command 
line, use the following command to define the Beam SDK and Java versions for 
the new project.</p><pre tabindex=0><code>export BEAM_VERSION=2.52.0
 export JAVA_VERSION=11
 </code></pre></li><li><p>Create the project.</p><pre tabindex=0><code>mvn 
archetype:generate \
     -DinteractiveMode=false \
@@ -53,7 +63,45 @@ export JAVA_VERSION=11
     -DgroupId=org.apache.beam.samples
 </code></pre></li><li><p>Change to the new project directory.</p><pre 
tabindex=0><code>cd check-pipeline-dependencies
 </code></pre></li><li><p>Resolve and list the dependencies.</p><pre 
tabindex=0><code>mvn dependency:resolve &amp;&amp; mvn -o dependency:list
-</code></pre></li></ol></div></div><footer class=footer><div 
class=footer__contained><div class=footer__cols><div class="footer__cols__col 
footer__cols__col__logos"><div class=footer__cols__col__logo><img 
src=/images/beam_logo_circle.svg class=footer__logo alt="Beam logo"></div><div 
class=footer__cols__col__logo><img src=/images/apache_logo_circle.svg 
class=footer__logo alt="Apache logo"></div></div><div class=footer-wrapper><div 
class=wrapper-grid><div class=footer__cols__col><div class [...]
+</code></pre></li></ol><h2 id=manage-dependencies>Manage 
dependencies</h2><p>To simplify dependency management, Beam provides
+<a 
href=https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms>Bill
 of Materials (BOM)</a>
+artifacts that help dependency management tools select compatible 
combinations.</p><p>When you import Apache Beam, using a Bill of Material 
artifact is recommended.
+When a project import contains unspecified or ambiguous dependencies,
+the BOM provides the information that the SDK needs to use the correct
+dependency version.</p><p>Apache Beam provides two 
BOMs:</p><ul><li><code>beam-sdks-java-bom</code>: manages Apache Beam 
dependencies, which allows
+you to specify the version only one 
time</li><li><code>beam-sdks-java-io-google-cloud-platform-bom</code>: manages 
Apache Beam, Google Cloud,
+and third-party dependencies</li></ul><p>Because errors are more likely to 
occur when you use third-party dependencies,
+the <code>beam-sdks-java-io-google-cloud-platform-bom</code> BOM is 
recommended.</p><h3 id=import-the-bom>Import the BOM</h3><p>To use a BOM, 
import the BOM into your Maven or Gradle
+dependency configuration. For example, to
+use <code>beam-sdks-java-io-google-cloud-platform-bom</code>,
+make the following changes in the <code>pom.xml</code> file of your SDK 
artifact.
+In the following examples, replace <em>BEAM_VERSION</em> with the appropriate
+Apache Beam SDK version.</p><p><strong>Maven</strong></p><div 
class=highlight><pre tabindex=0 class=chroma><code class=language-xml 
data-lang=xml><span class=line><span class=cl><span 
class=nt>&lt;dependencyManagement&gt;</span>
+</span></span><span class=line><span class=cl>  <span 
class=nt>&lt;dependencies&gt;</span>
+</span></span><span class=line><span class=cl>    <span 
class=nt>&lt;dependency&gt;</span>
+</span></span><span class=line><span class=cl>      <span 
class=nt>&lt;groupId&gt;</span>org.apache.beam<span 
class=nt>&lt;/groupId&gt;</span>
+</span></span><span class=line><span class=cl>      <span 
class=nt>&lt;artifactId&gt;</span>beam-sdks-java-google-cloud-platform-bom<span 
class=nt>&lt;/artifactId&gt;</span>
+</span></span><span class=line><span class=cl>      <span 
class=nt>&lt;version&gt;</span>BEAM_VERSION<span 
class=nt>&lt;/version&gt;</span>
+</span></span><span class=line><span class=cl>      <span 
class=nt>&lt;type&gt;</span>pom<span class=nt>&lt;/type&gt;</span>
+</span></span><span class=line><span class=cl>      <span 
class=nt>&lt;scope&gt;</span>import<span class=nt>&lt;/scope&gt;</span>
+</span></span><span class=line><span class=cl>    <span 
class=nt>&lt;/dependency&gt;</span>
+</span></span><span class=line><span class=cl>  <span 
class=nt>&lt;/dependencies&gt;</span>
+</span></span><span class=line><span class=cl><span 
class=nt>&lt;/dependencyManagement&gt;</span>
+</span></span></code></pre></div><p><strong>Gradle</strong></p><pre 
tabindex=0><code>dependencies {
+    
implementation(platform(&#34;org.apache.beam:beam-sdks-java-google-cloud-platform-bom:BEAM_VERSION&#34;))
+}
+</code></pre><h3 id=remove-version-pinning>Remove version pinning</h3><p>After 
you import the BOM, you can remove specific version pinning from your 
dependencies. For example,
+you can remove the versions associated with <code>org.apache.beam</code>, 
<code>io.grpc</code>, and <code>com.google.cloud</code>,
+including <code>libraries-bom</code>. Because the dependencies aren&rsquo;t 
automatically imported by the BOM,
+don&rsquo;t remove them entirely. Keep the dependency without specifying a 
version.</p><p>The following example shows dependencies without versions in 
Maven:</p><div class=highlight><pre tabindex=0 class=chroma><code 
class=language-xml data-lang=xml><span class=line><span class=cl><span 
class=nt>&lt;dependency&gt;</span>
+</span></span><span class=line><span class=cl>  <span 
class=nt>&lt;groupId&gt;</span>org.apache.beam<span 
class=nt>&lt;/groupId&gt;</span>
+</span></span><span class=line><span class=cl>  <span 
class=nt>&lt;artifactId&gt;</span>beam-sdks-java-core<span 
class=nt>&lt;/artifactId&gt;</span>
+</span></span><span class=line><span class=cl><span 
class=nt>&lt;/dependency&gt;</span>
+</span></span></code></pre></div><p>The following example shows dependencies 
without versions in Gradle:</p><pre 
tabindex=0><code>implementation(&#34;org.apache.beam:beam-sdks-java-core&#34;)
+</code></pre><h3 id=view-the-depenencies-managed-by-the-bom>View the 
depenencies managed by the BOM</h3><p>To see a full list of dependency versions 
that are managed by a specific BOM, use the
+Maven tool <code>help:effective-pom</code> by running the following command.
+Replace <em>BEAM_VERSION</em> with the appropriate Apache Beam SDK 
version.</p><div class=highlight><pre tabindex=0 class=chroma><code 
class=language-shell data-lang=shell><span class=line><span class=cl>mvn 
help:effective-pom -f 
~/.m2/repository/org/apache/beam/beam-sdks-java-google-cloud-platform-bom/BEAM_VERSION/beam-sdks-java-google-cloud-platform-bom-BEAM_VERSION.pom
+</span></span></code></pre></div><h2 id=resources>Resources</h2><ul><li><a 
href=https://mvnrepository.com/artifact/org.apache.beam/beam-sdks-java-google-cloud-platform-bom/>Beam
 SDKs Java Google Cloud Platform BOM</a> in the Maven 
repository.</li></ul></div></div><footer class=footer><div 
class=footer__contained><div class=footer__cols><div class="footer__cols__col 
footer__cols__col__logos"><div class=footer__cols__col__logo><img 
src=/images/beam_logo_circle.svg class=footer__logo alt="B [...]
 <a href=https://www.apache.org>The Apache Software Foundation</a>
 | <a href=/privacy_policy>Privacy Policy</a>
 | <a href=/feed.xml>RSS Feed</a><br><br>Apache Beam, Apache, Beam, the Beam 
logo, and the Apache feather logo are either registered trademarks or 
trademarks of The Apache Software Foundation. All other products or name brands 
are trademarks of their respective holders, including The Apache Software 
Foundation.</div></div><div class="footer__cols__col 
footer__cols__col__logos"><div class=footer__cols__col--group><div 
class=footer__cols__col__logo><a href=https://github.com/apache/beam><im [...]
\ No newline at end of file
diff --git a/website/generated-content/sitemap.xml 
b/website/generated-content/sitemap.xml
index c456f037941..d722ba9f162 100644
--- a/website/generated-content/sitemap.xml
+++ b/website/generated-content/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset 
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml";><url><loc>/categories/blog/</loc><lastmod>2023-11-22T08:17:58-08:00</lastmod></url><url><loc>/blog/</loc><lastmod>2023-11-22T08:17:58-08:00</lastmod></url><url><loc>/categories/</loc><lastmod>2023-11-22T08:17:58-08:00</lastmod></url><url><loc>/blog/contributor-spotlight-johanna-ojeling/</loc><lastmod>2023-11-22T08:17:58-08:00</lastm
 [...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset 
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml";><url><loc>/categories/blog/</loc><lastmod>2023-11-22T14:58:06-08:00</lastmod></url><url><loc>/blog/</loc><lastmod>2023-11-22T14:58:06-08:00</lastmod></url><url><loc>/categories/</loc><lastmod>2023-11-22T14:58:06-08:00</lastmod></url><url><loc>/blog/contributor-spotlight-johanna-ojeling/</loc><lastmod>2023-11-22T14:58:06-08:00</lastm
 [...]
\ No newline at end of file

Reply via email to