Update plugin documentation
* Use Java 11 to build
* Update build plugins
* Update documentation for site:site generation
diff --git a/.travis.yml b/.travis.yml
index 5e43444..015c96b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,7 @@
- $HOME/.m2
install: echo NOOP Skipping pre-fetch of Maven dependencies
jdk:
- - openjdk8
+ - openjdk11
before_script:
- unset _JAVA_OPTIONS
env:
diff --git a/pom.xml b/pom.xml
index 6054472..6f9aac9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,7 +89,7 @@
<url>https://travis-ci.org/apache/accumulo-maven-plugin</url>
</ciManagement>
<properties>
- <accumulo.version>2.0.0-SNAPSHOT</accumulo.version>
+ <accumulo.version>2.0.0</accumulo.version>
<eclipseFormatterStyle>contrib/Eclipse-Accumulo-Codestyle.xml</eclipseFormatterStyle>
<!-- extra release args for testing -->
<extraReleaseArguments />
@@ -119,6 +119,13 @@
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-minicluster</artifactId>
<version>${accumulo.version}</version>
+ <exclusions>
+ <exclusion>
+ <!-- for some reason, hibernate in the accumulo-monitor brings this in -->
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx.base</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -190,10 +197,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- newer version than in apache-21.pom -->
- <version>3.1.0</version>
+ <version>3.1.1</version>
<configuration>
<quiet>true</quiet>
- <javadocVersion>1.8.0</javadocVersion>
<additionalJOption>-J-Xmx512m</additionalJOption>
<doclint>all,-missing</doclint>
</configuration>
@@ -218,7 +224,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<!-- newer version than in apache-21.pom -->
- <version>3.7.1</version>
+ <version>3.8.2</version>
<configuration>
<skipDeploy>true</skipDeploy>
</configuration>
@@ -271,7 +277,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
- <version>${spotbugs.version}</version>
+ <version>${spotbugs.version}.1</version>
<configuration>
<xmlOutput>true</xmlOutput>
<effort>Max</effort>
@@ -409,7 +415,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
- <version>8.22</version>
+ <version>8.23</version>
</dependency>
</dependencies>
<executions>
@@ -439,46 +445,26 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-enforcer-rule</artifactId>
- <version>1.18</version>
- </dependency>
- </dependencies>
<executions>
<execution>
- <id>enforce-basic-rules</id>
+ <!-- must be same id as in the apache parent pom, to override the version -->
+ <id>enforce-maven-version</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>validate</phase>
<configuration>
<rules>
+ <requireMavenVersion>
+ <!-- org.apache.felix:maven-bundle-plugin declares that it needs 3.5.0 -->
+ <version>[3.5.0,)</version>
+ </requireMavenVersion>
<requireJavaVersion>
- <version>[${maven.compiler.target},)</version>
+ <version>[11,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
- <execution>
- <id>enforce-java-signatures</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <phase>process-test-classes</phase>
- <configuration>
- <rules>
- <checkSignatureRule implementation="org.codehaus.mojo.animal_sniffer.enforcer.CheckSignatureRule">
- <signature>
- <groupId>org.codehaus.mojo.signature</groupId>
- <artifactId>java18</artifactId>
- <version>1.0</version>
- </signature>
- </checkSignatureRule>
- </rules>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
@@ -619,7 +605,7 @@
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
- <version>1.2.0</version>
+ <version>1.3.0</version>
<configuration>
<removeUnused>true</removeUnused>
<groups>java.,javax.,org.,com.</groups>
@@ -643,6 +629,10 @@
<name>m2e.version</name>
</property>
</activation>
+ <properties>
+ <!-- add compiler compliance to Eclipse -->
+ <maven.compiler.release>8</maven.compiler.release>
+ </properties>
<build>
<pluginManagement>
<plugins>
diff --git a/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java b/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java
index 2689090..01e62a1 100644
--- a/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java
+++ b/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java
@@ -30,7 +30,12 @@
@Parameter(defaultValue = "${project}", readonly = true)
private MavenProject project;
- @Parameter(defaultValue = "false", alias = "skip", property = "accumulo.skip", required = true)
+ /**
+ * Instructs this plugin to skip execution.
+ *
+ * @since 1.0.0
+ */
+ @Parameter(defaultValue = "false", alias = "skip", property = "accumulo.skip", required = false)
private boolean skip;
protected boolean shouldSkip() {
diff --git a/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java b/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
index b40cbcd..ad39045 100644
--- a/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
+++ b/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
@@ -40,20 +40,63 @@
requiresDependencyResolution = ResolutionScope.TEST)
public class StartMojo extends AbstractAccumuloMojo {
+ /**
+ * Specifies the output directory in which this plugin will create files for its runtime use. This
+ * plugin will create a client properties file inside a subdirectory named after this plugin and
+ * the specified instance name. This property defaults to your Maven target directory.
+ *
+ * <p>
+ * For example: <code>${outputDirectory}/accumulo2-maven-plugin/instanceName</code>
+ *
+ * <p>
+ * The client properties file can be used to construct an Accumulo client in your test code like:
+ *
+ * <code>
+ * <pre>
+ * String instanceName = "plugin-it-instance";
+ * String outputDir = "target";
+ * File propsFile = new File(outputDir + "/accumulo2-maven-plugin/" + instanceName);
+ * Properties props = MiniAccumuloCluster.getClientProperties(propsFile);
+ * AccumuloClient client = Accumulo.newClient().from(props).build();
+ * </pre>
+ * </code>
+ *
+ * @since 1.0.0
+ */
@Parameter(defaultValue = "${project.build.directory}", alias = "outputDirectory",
property = "accumulo.outputDirectory", required = true)
private File outputDirectory;
+ /**
+ * Specifies the instance name the Accumulo instance will use for itself, which clients use to
+ * connect. It is also used to create the working directory for MiniAccumuloCluster, which will
+ * contain the client properties file which clients can use to connect. See
+ * <a href="#outputDirectory">{@link #outputDirectory}</a>.
+ *
+ * @since 1.0.0
+ */
@Parameter(defaultValue = "testInstance", alias = "instanceName",
property = "accumulo.instanceName", required = true)
private String instanceName;
+ /**
+ * Specifies the root user's initial password for clients to connect and perform additional
+ * operations.
+ *
+ * @since 1.0.0
+ */
@Parameter(defaultValue = "secret", alias = "rootPassword", property = "accumulo.rootPassword",
- required = true)
+ required = false)
private String rootPassword;
+ /**
+ * Specifies the client port on which ZooKeeper listens. If not specified, MiniAccumuloCluster
+ * will select an available port on its own.
+ *
+ * @since 1.0.0
+ */
@Parameter(defaultValue = "0", alias = "zooKeeperPort", property = "accumulo.zooKeeperPort",
- required = true)
+ required = false)
private int zooKeeperPort;
static Set<MiniAccumuloCluster> runningClusters = Collections.synchronizedSet(new HashSet<>());
diff --git a/src/site/markdown/index.md.vm b/src/site/markdown/index.md.vm
index bb938fc..8c0f5b3 100644
--- a/src/site/markdown/index.md.vm
+++ b/src/site/markdown/index.md.vm
@@ -21,6 +21,14 @@
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("accumulo.version")`. 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).
+
Getting Started
---------------
@@ -63,4 +71,5 @@
`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
diff --git a/src/site/site.xml b/src/site/site.xml
index 5f4dc22..4b49568 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -16,7 +16,7 @@
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
- <version>1.7</version>
+ <version>1.8</version>
</skin>
<custom>
<fluidoSkin>
@@ -26,6 +26,7 @@
</custom>
<body>
<menu name="Overview">
+ <item name="Accumulo Home" href="../"/>
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
</menu>