You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by Christopher <ct...@apache.org> on 2016/06/01 18:39:39 UTC

Jar sealing

Devs-

There's been a few issues with jar sealing that I've run into lately. Some
of which only occurred doing test RC builds. To make these issues more
prominent, I recently made the maven-jar-plugin always do jar sealing, so
we can catch these issues earlier, as part of a pom/build update to use the
latest plugins in ASF parent pom 18.

I'm currently working through the issues preventing builds in the current
branches. However, I'd like to remind everyone to put their class files in
distinct packages to avoid these issues in the future.

Here's a few guidelines:

1. Make all your packages begin with org.apache.accumulo (don't use the
default package, or something generic, like "test")

2. Packages in the module XYZ should begin with org.apache.accumulo.XYZ

3. Unit tests run by surefire (src/test/java/**/*Test.java,
src/test/java/**/Test*.java) can be in the same package as those in
src/main/java, in order to access package-private members for testing.

4. Integration tests run by failsafe (src/test/java/**/*IT.java,
src/test/java/**/IT*.java) should never be in the same package as a class
in src/main/java.

5. The test module is a special case:
  a) The ITs in recent branches in the test module have been moved to
src/main/java. Make sure you move them to the correct location when merging
ITs created for older branches.
  b) Tests in the test module should be in their own package, as described
in #2. Make sure you rename the package if you move a test from another
module into the test module.
  c) The only classes which should be in src/test/java in the test module
are unit tests for testing frameworks in the test module themselves. If any
such classes should exist, they must be in distinct packages from those in
src/main/java. This is an exception to the #3 rule above, because failsafe
runs ITs from src/main/java for this module only.

Hopefully those guidelines help. If anybody needs more detailed explanation
about jar sealing, or has questions about these recommendations or about
our build or the maven build plugins, feel free to ask. I'll do my best to
explain.

Thanks.