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 for releases. Before invoking Maven, it checks whether the artifact POM already exists in the configured release repository. Existing artifacts set maven.deploy.skip=true for the nested build, preventing partial uploads to immutable repositories while still allowing other publishing plugins in the generated POM to run. HTTP 409 Conflict responses are also logged as warnings.

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.
mavenGlobalSettingsFile${project.basedir}/settings.xml (if present)Path to a Maven settings.xml for repository authentication, resolved relative to project.basedir if not absolute. If unset (or the resolved file does not exist), falls back to settings.xml in the project's basedir, if present; otherwise no global settings file is passed to the nested Maven invocation.
releaseRepositoryUrl${releaseRepositoryUrl}Maven release repository used to check whether a release artifact already exists. If unset or inaccessible, the preflight check is skipped and deployment proceeds normally.
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