[SUREFIRE-1679] Prevent classpath caching from causing pollution#244
[SUREFIRE-1679] Prevent classpath caching from causing pollution#244Tibor17 merged 1 commit intoapache:release/2.22.2from
Conversation
Previously, classpath caching was performed statically. This resulted in the classpath cached by one project for a particular provider being used by a subsequent project. As a result any customizations to the classpath, such as removing duplicate artifacts, would leak out and pollute the classpath used by subsequent projects. This commit prevents the pollution by making the classpath cache instance-scoped so that the cache is only used by a single mojo and, therefore, a single project. Backports f7d4310 to 2.22.x
sormuras
left a comment
There was a problem hiding this comment.
LGTM
Changes made to the test case are minimal - less mocking is a good thing.
|
it's okay in version 2.x since these tests must be older and different from 3.x. The reason why there is File mock is to simplify the Captures of debug logger because there is no physicla path and creating real Jar files, no troubles with platform and long lines in code. Also it is a signal for us to fail the test if the logic in These tests in |
|
LGTM |
|
Resolve #2092 |
This pull request backports the changes made in #243 to 2.22.x. The main source changes are the same. The test has be modified to align with the small differences in the implementation. Most notably, I have introduced the use of
TemporaryFolderas the use of a mockedFileresulted in an NPE as thepathfield of the mockedFilewasnull. I hope that's OK.