| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| https://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| |
| #set ($d = "$") |
| |
| Description |
| ----------- |
| |
| This `accumulo2-maven-plugin` allows your Maven project to run a mini, |
| single node instance of Apache Accumulo 2.x in order for you to run your |
| project's integration tests against a live version of Accumulo. |
| |
| This version of the plugin uses |
| `accumulo-minicluster-$context.get("version.accumulo")`. This version [can |
| be overridden similar to overriding checkstyle versions][2] by a later 2.x |
| version. Because Accumulo follows [Semantic Versioning][3], and this plugin |
| limits itself to using only public API, this should work if you meet the |
| dependency requirements of that version (accumulo-minicluster-2.1.0 will |
| require Java 11, for example). |
| |
| For an example of setting Accumulo, Hadoop, and Zookeeper versions when using |
| this plugin checkout [Fluo's pom][4]. |
| |
| Getting Started |
| --------------- |
| |
| To add this plugin to your project, configure the plugin similarly to: |
| |
| ```xml |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>${project.groupId}</groupId> |
| <artifactId>${project.artifactId}</artifactId> |
| <version>${project.version}</version> |
| <configuration> |
| <instanceName>it-instance-maven</instanceName> |
| <rootPassword>ITSecret</rootPassword> |
| </configuration> |
| <executions> |
| <execution> |
| <id>run-plugin</id> |
| <goals> |
| <goal>start</goal> |
| <goal>stop</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| ``` |
| |
| and build your project, similarly to: |
| |
| ``` |
| mvn verify |
| ``` |
| |
| The `start` goal typically runs at the `pre-integration-test` phase, and the |
| stop goal typically runs at the `post-integration-test` phase of the [Maven lifecycle][1], |
| so your project will have access to the running Accumulo instance during the |
| `integration-test` phase to perform its integration tests. |
| |
| [1]: https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html |
| [2]: https://blog.sonatype.com/2008/04/how-to-override-a-plugins-dependency-in-maven/ |
| [3]: https://semver.org/spec/v2.0.0.html |
| [4]: https://github.com/apache/fluo/blob/2fe8215d66a73ef44b399bd5aeb50a198c71be0f/pom.xml#L260-L299 |