You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.8 KiB
HTML
74 lines
2.8 KiB
HTML
12 months ago
|
{{/*
|
||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||
|
or more contributor license agreements. See the NOTICE file
|
||
|
distributed with this work for additional information
|
||
|
regarding copyright ownership. The ASF licenses this file
|
||
|
to you under the Apache License, Version 2.0 (the
|
||
|
"License"); you may not use this file except in compliance
|
||
|
with the License. You may obtain a copy of the License at
|
||
|
|
||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
||
|
Unless required by applicable law or agreed to in writing,
|
||
|
software distributed under the License is distributed on an
|
||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
|
KIND, either express or implied. See the License for the
|
||
|
specific language governing permissions and limitations
|
||
|
under the License.
|
||
|
*/}}
|
||
|
{{/*
|
||
|
Generates an XML snippet for the maven artifact.
|
||
|
IMPORTANT: the whitespace is relevant. Do not change without looking at the
|
||
|
rendered documentation.
|
||
|
*/}}
|
||
|
{{ $artifactId := .Get 0 }}
|
||
|
{{ $name := .Get 1 }}
|
||
|
{{ $connector := index .Site.Data $name }}
|
||
|
{{ $version := $connector.version }}
|
||
|
{{ $path := .Page.Path }}
|
||
|
|
||
|
{{ $connector := index .Site.Data $name }}
|
||
|
{{ $flink_compatibility := $connector.flink_compatibility }}
|
||
|
{{ $flink_version := .Site.Params.VersionTitle }}
|
||
|
|
||
|
{{ $hash := md5 now }}
|
||
|
|
||
|
{{ $containsVersion := false }}
|
||
|
{{ range $flink_compatibility }}
|
||
|
{{ if in . $flink_version }}
|
||
|
{{ $containsVersion = true }}
|
||
|
{{ break }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ $scalaVersion := "" }}
|
||
|
{{ range after 2 .Params }}
|
||
|
{{ if eq . "withScalaVersion" }}
|
||
|
{{ $scalaVersion = "true" }}
|
||
|
{{ else }}
|
||
|
{{ errorf "%q: Invalid use of artifact shortcode. Unknown flag `%s`" $path . }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ if ne $scalaVersion "" }}
|
||
|
|
||
|
{{ $artifactId = printf "%s%s" $artifactId $.Site.Params.ScalaVersion }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ if $.Site.Params.IsStable }}
|
||
|
{{ if $containsVersion }}
|
||
|
<div id="{{ $hash }}" onclick="selectTextAndCopy('{{ $hash }}')"class="highlight"><pre class="chroma"><code class="language-xml" data-lang="xml"><span class="nt"><dependency></span>
|
||
|
<span class="nt"><groupId></span>org.apache.flink<span class="nt"></groupId></span>
|
||
|
<span class="nt"><artifactId></span>{{- $artifactId -}}<span class="nt"></artifactId></span>
|
||
|
<span class="nt"><version></span>{{- $version -}}-{{- site.Params.VersionTitle -}}<span class="nt"></version></span>
|
||
|
<span class="nt"></dependency></span></code></pre></div>
|
||
|
<div class="book-hint info" style="text-align:center;display:none" copyable="flink-module" copyattribute="{{ $hash }}">
|
||
|
Copied to clipboard!
|
||
|
</div>
|
||
|
{{ else }}
|
||
|
<p style="font-weight: bold">There is no connector (yet) available for Flink version {{ printf $flink_version }}.</p>
|
||
|
{{ end }}
|
||
|
{{ else }}
|
||
|
<p style="font-weight: bold">Only available for stable versions.</p>
|
||
|
{{ end }}
|