Skip to main content

Plugin goals

The plugin provides two Maven goals: registry for validation and code generation, and deploy-index-type-artifacts for packaging and deploying the generated artifacts.

Goal: registry

Default phase: verify

Validates the registry structure and generates Java sources and mapping files for all index types.

Parameters

ParameterDefaultDescription
descriptorDirectory${basedir}/index-typesRoot directory of the index type descriptors.
basePackage(required)Java package for generated classes (e.g. ch.admin.bit.jme.opensearch.index).
gitUrlGit URL of the registry repository. Used to clone the trunk branch for immutability comparison. Set to empty to skip trunk comparison (local development).
gitTokenEnvVariableNameINDEX_TYPE_REPO_GIT_TOKENName of the environment variable holding the Git authentication token. Falls back to unauthenticated access if not set.
trunkBranchNamemasterBranch to compare against for immutability checks.
indexTypeVersionVersion of jeap-opensearch-index-type declared as a dependency in each generated artifact's POM.
outputDirectory${project.build.directory}/generated-sources/index-type-registryDirectory for generated Java sources.
outputResourcesDirectory${project.build.outputDirectory}Directory for META-INF/ resources and opensearch/ mapping files.
skipGenerationfalseWhen true, validation runs but no Java sources are generated.

Local development

# Validate and generate without cloning the trunk branch
mvn verify -Dindextype.git.url=

# Validation only, skip code generation
mvn verify -Dindextype.git.url= -DskipGeneration=true

Goal: deploy-index-type-artifacts

Default phase: deploy

Packages each (index type, major version) pair into an individual Maven JAR and deploys it.

The goal is idempotent: HTTP 409 Conflict responses (artifact already exists) are logged as warnings rather than failing the build, so the goal is safe to re-run.

Parameters

ParameterDefaultDescription
groupIdPrefix(required)GroupId prefix for generated artifacts. The lowercase system name is appended automatically.
indexTypeVersion(required)Version string for the generated artifacts (e.g. 1.2 on trunk, 1.2-feature-branch-SNAPSHOT on feature branches).
basePackage(required)Must match the registry goal configuration.
mavenDeployGoaldeploydeploy to push to a remote repository, install to install to the local Maven repository.
mavenGlobalSettingsFilePath to a Maven settings.xml for repository authentication.
deployAllIndexTypesfalseWhen true, deploys all index types unconditionally. On trunk the plugin always deploys all types; on feature branches only changed types are deployed by default.
gitUrlGit URL for change detection. Set to empty to deploy all unconditionally.
gitTokenEnvVariableNameINDEX_TYPE_REPO_GIT_TOKENEnvironment variable holding the Git token.
trunkBranchNamemasterBranch used for change detection.
currentBranch${git.branch}Current branch name, injected by git-commit-id-maven-plugin.
trunkMavenProfileMaven profile activated only when building on the trunk branch.
pomTemplateFileCustom POM template for generated artifacts. Falls back to the built-in default.
skipfalseSkip this goal entirely.

Local deployment

# Install generated artifacts to the local Maven repository
mvn deploy -Dindextype.git.url= -DmavenDeployGoal=install