Switch to per-tool classpath configuration.

Review Request #11651 — Created June 7, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

The original design for checkstyle and the Java mixin for tools provided
for a single configured classpath, defined as java_classpath in the
configuration file or as the $CLASSPATH environment variable.

In practice, this doesn't work too well. Both PMD and checkstyle used
some of the same dependencies, bundled in both their respective jar
files. Depending on the versions, these dependencies would conflict when
both were in a classpath.

Rather than having a single classpath, there's now tool-specific
classpaths, defined as tool keys in java_classpaths in the
configuration file.

The $CLASSPATH environment variable is no longer supported or
recommended, but if it's set for the process, it will still bubble
through. We may not want to support this long-term, but we get it for
free right now due to how execute() works, and it's not worth the
effort of preventing it.

All unit tests passed.

Summary ID
Switch to per-tool classpath configuration.
The original design for checkstyle and the Java mixin for tools provided for a single configured classpath, defined as `java_classpath` in the configuration file or as the `$CLASSPATH` environment variable. In practice, this doesn't work too well. Both PMD and checkstyle used some of the same dependencies, bundled in both their respective jar files. Depending on the versions, these dependencies would conflict when both were in a classpath. Rather than having a single classpath, there's now tool-specific classpaths, defined as tool keys in `java_classpaths` in the configuration file. The `$CLASSPATH` environment variable is no longer supported or recommended, but if it's set for the process, it will still bubble through. We may not want to support this long-term, but we get it for free right now due to how `execute()` works, and it's not worth the effort of preventing it.
72596570e7e8b0c93fb24cba6c6b8be9deb90827
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (9390dfa)