使用 ml-gradle 部署特定的 MarkLogic 数据库配置
Deploy a specific MarkLogic Database configuration using ml-gradle
是否有 CLI 参数或参数来部署特定数据库的配置,而不是部署 src/main/ml-config/databases 下的所有数据库配置?
例如当我使用 gradle mlDeployDatabases
命令时,它会部署所有数据库配置。
我正在寻找像 -PmlDatabaseName=Database1
这样的参数,它可以让我只部署 Database1 数据库。
gradle mlDeployDatabases -PmlDatabaseName=Database1
有几个属性可用于包含或排除资源文件:
https://github.com/marklogic-community/ml-gradle/wiki/Property-reference#other-resource-properties
mlResourceFilenamesToExcludeRegex
New in 3.0.0 - regex that defines resource filenames to exclude from processing (exclude = ignore). Useful for when you want to exclude a set of resources when deploying to a certain environment. Cannot be set when mlResourceFilenamesToIncludeRegex
is also set. No default value.
mlResourceFilenamesToIgnore
Comma-separated list of resource filenames that should be ignored and not deployed. Useful for when different environments require different resources to be deployed. No default value.
mlResourceFilenamesToIncludeRegex
New in 3.0.0 - regex that defines resource filenames to include. If a filename doesn't match this regex, then it will be excluded (ignored). Cannot be set when mlResourceFilenamesToExcludeRegex
is also set. No default value.
如果您的“Database1”文件是“Database1.json”,则类似于:
gradle mlDeployDatabases -PmlResourceFilenamesToIncludeRegex=Database1.json
是否有 CLI 参数或参数来部署特定数据库的配置,而不是部署 src/main/ml-config/databases 下的所有数据库配置?
例如当我使用 gradle mlDeployDatabases
命令时,它会部署所有数据库配置。
我正在寻找像 -PmlDatabaseName=Database1
这样的参数,它可以让我只部署 Database1 数据库。
gradle mlDeployDatabases -PmlDatabaseName=Database1
有几个属性可用于包含或排除资源文件:
https://github.com/marklogic-community/ml-gradle/wiki/Property-reference#other-resource-properties
mlResourceFilenamesToExcludeRegex
New in 3.0.0 - regex that defines resource filenames to exclude from processing (exclude = ignore). Useful for when you want to exclude a set of resources when deploying to a certain environment. Cannot be set whenmlResourceFilenamesToIncludeRegex
is also set. No default value.mlResourceFilenamesToIgnore
Comma-separated list of resource filenames that should be ignored and not deployed. Useful for when different environments require different resources to be deployed. No default value.mlResourceFilenamesToIncludeRegex
New in 3.0.0 - regex that defines resource filenames to include. If a filename doesn't match this regex, then it will be excluded (ignored). Cannot be set whenmlResourceFilenamesToExcludeRegex
is also set. No default value.
如果您的“Database1”文件是“Database1.json”,则类似于:
gradle mlDeployDatabases -PmlResourceFilenamesToIncludeRegex=Database1.json