Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Housecleaning #23

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Housecleaning #23

wants to merge 12 commits into from

Conversation

runeflobakk
Copy link
Contributor

Some housecleaning chores to bring the code base and pom.xml up to speed.

  • upgade dependencies: hamcrest 2.2 and junit 5 (test)
  • upgrade Maven plugins
  • pom.xml restructure (see 4780bae for rationale behind changes)
  • enable a reasonable doclint for javadoc, to catch errors
  • skip building test-jar (I don't think anyone is depending on test code from this project?)
  • minor formatting fixups, and add .editorconfig (supported out of the box in IntelliJ and numerous other editors, some editors need a plugin to be aware of it, but not mandatory)

- missing whitespace
- star-imports
The doclint is set to "all except missing tags". It's a reasonable
setting to avoid having to add redundant noise for self-explanatory
paramters, types and such.
Use strictly pluginManagement for settings versions in order to be able
to invoke single plugins and get the same version as specified in the
build, as well as configuration.

Executions, in addition to plugins part of the default (jar) lifecycle,
are configured in build/plugins.

Configure versions-maven-plugin to be able to check for newer
dependencies/plugin versions

Add maven-enforcer-plugin to set minimal Maven version required by
configured plugins.
Change tests to being package scoped, and remov unnecessary exception
declarations.
maven-dependency-plugin analyzes and failes the build if:
- code is using a dependency which has been pulled in transitively, but
not declared as a dependency. Code used is direct dependency, and must
be declared as such.
- a dependency has been declared, but the code is actually not using it.
Thus, is can be removed (unless it is a runtime dependency, but the
nature of this library makes this very unlikely).
oraclejdk8 only gives error:
Expected feature release number in range of 9 to 15, but got: 8
The command "~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during .

Supposedly it is possible to use oraclejdk8 if forcing the dist on
Travis to be "trusty", but it is EOL, so let's not start using something
which is already deprecated and will eventually go away. OpenJDK works
just fine.
Default build command on Travis is mvn test
Travis' default behaviour is to first do mvn install without tests to
"install" dependencies, and then execute a normal build with tests.
This is to align with the build lifecycle defined by Travis, but it is
not necessary for a Maven build, which should do everything it needs by
executing the idiomatic mvn clean install.

This should even further speed up the build.
Copy link
Contributor

@CliveEvans CliveEvans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants