https://github.com/codelibs/elasticsearch-plugin-archetype
Maven Archetype for Elasticsearch plugin
https://github.com/codelibs/elasticsearch-plugin-archetype
Last synced: 11 months ago
JSON representation
Maven Archetype for Elasticsearch plugin
- Host: GitHub
- URL: https://github.com/codelibs/elasticsearch-plugin-archetype
- Owner: codelibs
- License: apache-2.0
- Created: 2013-09-07T01:28:31.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T02:33:31.000Z (over 6 years ago)
- Last Synced: 2025-07-04T00:16:40.946Z (12 months ago)
- Language: Java
- Size: 40 KB
- Stars: 6
- Watchers: 10
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Elasticsearch Plugin Archetype
==============================
## Overview
This project (elasticsearch-plugin-archetype) provides Maven archetype for Elasticsearch plugin.
You can easily create your elasticsearch plugin by this archetype.
## Version
| Version | elasticsearch |
|:---------:|:-------------:|
| master | 6.6.X |
| 6.6.0 | 6.6.1 |
| 2.3.0 | 2.3.3 |
| 1.5.0 | 1.5.2 |
| 1.4.0 | 1.4.0.Beta1 |
| 1.3.0 | 1.3.0 |
| 1.2.0 | 1.2.1 |
| 1.1.0 | 1.0.0.RC2 |
| 1.0.0 | 0.90.5 |
### Issues/Questions
Please file an [issue](https://github.com/codelibs/elasticsearch-plugin-archetype/issues "issue").
## Usage
Using archetype:generate goal of Maven, run the following command:
$ mvn archetype:generate \
-DarchetypeGroupId=org.codelibs \
-DarchetypeArtifactId=elasticsearch-plugin-archetype \
-DarchetypeVersion=6.6.0 \
-DelasticsearchVersion=6.6.1 \
-DgroupId= \
-DartifactId= \
-Dversion= \
-DpluginName= \
-DrestName=
Properties description is below:
| Property Name | Description | Example |
|:--------------------:|:---------------------:|:-------------------:|
| elasticsearchVersion | Elasticsearch version | 6.6.1 |
| groupId | Project's groupId | com.example |
| artifactId | Project's artifactid | elasticsearch-hello |
| version | Project's version | 1.0-SNAPSHOT |
| pluginName | Plugin class name | Hello |
| restName | Rest API name | hello |
elasticsearchVersion and restName are optional.
For example, the command is below:
$ mvn archetype:generate \
-DarchetypeGroupId=org.codelibs \
-DarchetypeArtifactId=elasticsearch-plugin-archetype \
-DarchetypeVersion=6.6.0 \
-DgroupId=com.example \
-DartifactId=elasticsearch-hello \
-Dversion=1.0-SNAPSHOT \
-DpluginName=Hello
## Create Rest API
A class file for Rest API is Rest\Action.
You can put your code into Rest\Action.
The urls to access to Rest\Action are:
http://localhost:9200/{index}/_
The definistion is in a constructor of Rest\Action.