Expand Java runtime Requirement
This is a complicated dependency for MavenRequirement
, CheckstyleBear and ScalaLintBear, and is needed for other packages that wrap java, such as pypi language-check
.
This dependency should be instantiated once at a documented name, and re-used whenever required.
Currently MavanRequirement only declare that it needs to have an executable 'mvn', but Maven can also exist as a jar in which case the OS needs to provide 'jar', and to install that we need a DistributionRequirement
, only the name of the distro package name varies a lot between versions of the distro.
c.f. https://github.com/coala/coala/issues/2676 "Also, java versions change frequently, java-7-openjdk is not available in Fedora 24, and java-8-openjdk is not available in older versions"
Though to be fair, many distributions now include something like 'default-jre'.
But that isnt sophisticated enough when (currently) Checkstyle needs Java 7, and in the future will likely support both Java 7 and Java 8, or only Java 8.
Issue created due to https://github.com/coala/coala/issues/2676