Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 2.51 KB

BUILDING.md

File metadata and controls

34 lines (22 loc) · 2.51 KB

Building Plugins with OpenSearch

Until OpenSearch and other artifacts are published to Maven Central OpenSearch#581, plugins may require building all their dependencies and publishing them to Maven local.

Publish OpenSearch to Maven Local

Use the 1.0.0-beta1 tag to have a stable version 1.0.0-beta1 Tag.

This will publish artifacts which are part of release version 1.0.0-beta1. This will support running integration tests. Please note that the limitation for integration tests is that it is only supported for builds on linux platform. In order to run the integration tests on non-linux platforms, temporarily change the testClusters.integTest.testDistribution param in the build.gradle file of the plugin from "ARCHIVE" to "INTEG_TEST" (see related issue).

~/OpenSearch (main)> git checkout 1.0.0-beta1 -b beta1-release
~/OpenSearch (main)> ./gradlew publishToMavenLocal -Dbuild.version_qualifier=beta1 -Dbuild.snapshot=false

On Unix, the local Maven repository is the ~/.m2 folder. For example, the above command produces ~/.m2/repository/org/opensearch/opensearch/1.0.0-beta1/opensearch-1.0.0-beta1.jar.

Use OpenSearch from Maven Local in Plugins

Your plugin may have more dependencies than just OpenSearch. For example, anomaly-detection requires OpenSearch, common-utils and job-scheduler to be successfully published to Maven local, manually.

The following trivial build script changes were made to successfully run ./gradlew publishToMavenLocal in each of these.

We plan to remove the need for this work-around via OpenSearch#581.