accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo-website] ctubbsii commented on a change in pull request #206: Checkstyle import control blog post. Fixes #149
Date Wed, 06 Nov 2019 02:20:50 GMT
ctubbsii commented on a change in pull request #206: Checkstyle import control blog post. Fixes
#149
URL: https://github.com/apache/accumulo-website/pull/206#discussion_r342889187
 
 

 ##########
 File path: _posts/blog/2019-11-04-checkstyle-import-control.md
 ##########
 @@ -0,0 +1,93 @@
+---
+title: "Checking API use"
+---
+
+Accumulo follows [SemVer] across versions with the declaration of a public API.  Code not
in the public API should be
+considered unstable, at risk of changing between versions.  The packages included in the
public API are [listed on the website][api]
+but may not always be considered when developing using Accumulo code.  This blog post explains
how to setup a Maven project
+to automatically detect when Accumulo 2.0 code used in the project is outside of the public
API.
+
+## Checkstyle Plugin
+
+First add the checkstyle Maven plugin to your pom.
+
+```xml
+<plugin>
+    <!-- This was added to ensure project only uses public API -->
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-checkstyle-plugin</artifactId>
+    <version>3.1.0</version>
+    <configuration>
+      <configLocation>checkstyle.xml</configLocation>
+    </configuration>
+    <dependencies>
+      <dependency>
+        <groupId>com.puppycrawl.tools</groupId>
+        <artifactId>checkstyle</artifactId>
+        <version>8.23</version>
+      </dependency>
+    </dependencies>
 
 Review comment:
   Overriding dependency versions of a plugin is an advanced feature, making section optional.
It could be removed to simplify the example, unless we need to override the version of checkstyle
to get a specific version for this functionality to work. Otherwise, most people are probably
just going to want to use the version used by the plugin. Removing this also makes it more
likely that the user will have a good experience here, because some versions of the checkstyle
dependency may not work as well as those tested by the plugin developers.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message