正在加载

经典插件的插件描述符文件

经典插件描述符文件是一个名为 plugin-descriptor.properties 的 Java 属性文件,用于描述插件。如果您正在使用 Elasticsearch 的 Gradle 构建系统,则该文件会自动创建。如果您没有使用 gradle 插件,则可以使用以下模板手动创建它。

# Elasticsearch plugin descriptor file
# This file must exist as 'plugin-descriptor.properties' or 'stable-plugin-descriptor.properties inside a plugin.
#
## example plugin for "foo"
#
# foo.zip <-- zip file for the plugin, with this structure:
# |____   <arbitrary name1>.jar <-- classes, resources, dependencies
# |____   <arbitrary nameN>.jar <-- any number of jars
# |____   plugin-descriptor.properties <-- example contents below:
#
# classname=foo.bar.BazPlugin
# description=My cool plugin
# version=6.0
# elasticsearch.version=6.0
# java.version=1.8
#
## mandatory elements for all plugins:
#
# 'description': simple summary of the plugin
description=${description}
#
# 'version': plugin's version
version=${version}
#
# 'name': the plugin name
name=${name}
#
# 'java.version': version of java the code is built against
# use the system property java.specification.version
# version string must be a sequence of nonnegative decimal integers
# separated by "."'s and may have leading zeros
java.version=${javaVersion}
#
# 'elasticsearch.version': version of elasticsearch compiled against.
# Plugins implementing plugin-api.jar this version only has to match a major version of the ES server
# For all other plugins it has to be the same as ES server version
elasticsearch.version=${elasticsearchVersion}
## optional elements for plugins:
<% if (classname) { %>
#
# 'classname': the name of the class to load, fully-qualified. Only applies to
# "isolated" plugins
classname=${classname}
<% } %>
<% if (modulename) { %>
#
# 'modulename': the name of the module to load classname from. Only applies to
# "isolated" plugins. This is optional. Specifying it causes the plugin
# to be loaded as a module.
modulename=${modulename}
<% } %>
<% if (extendedPlugins) { %>
#
#  'extended.plugins': other plugins this plugin extends through SPI
extended.plugins=${extendedPlugins}
<% } %>
<% if (hasNativeController) { %>
#
# 'has.native.controller': whether or not the plugin has a native controller
has.native.controller=${hasNativeController}
<% } %>
<% if (licensed) { %>
# This plugin requires that a license agreement be accepted before installation
licensed=${licensed}
<% } %>
元素 类型 描述
description 字符串 插件的简单摘要
version 字符串 插件的版本
name 字符串 插件名称
classname 字符串 要加载的类的名称,完全限定。
extended.plugins 字符串 此插件通过 SPI 扩展的其他插件。
modulename 字符串 从中加载 classname 的模块的名称。 仅适用于“隔离”插件。 这是可选的。 指定它会导致插件作为模块加载。
java.version 字符串 代码构建所针对的 Java 版本。使用系统属性 java.specification.version。 版本字符串必须是由“.”分隔的一系列非负十进制整数,并且可能具有前导零。
elasticsearch.version 字符串 编译所针对的 Elasticsearch 版本。
© . All rights reserved.