chore: skip cache for download-maven-plugin usages#13272
Conversation
There was a problem hiding this comment.
Code Review
This pull request configures a custom cacheDirectory for the download-maven-plugin across several POM files. The reviewer pointed out that because <overwrite>true</overwrite> is already set in these configurations, caching is redundant. It is recommended to use <skipCache>true</skipCache> instead of setting a custom cache directory to simplify the configuration and avoid potential cache locking issues.
| <cacheDirectory> | ||
| ${project.build.directory}/download-cache | ||
| </cacheDirectory> |
There was a problem hiding this comment.
Since <overwrite>true</overwrite> is configured, the plugin is already instructed to always download the latest version and overwrite the existing file, making caching completely redundant. Instead of configuring a custom cacheDirectory (which is deleted on mvn clean anyway), you can completely disable caching for this execution using <skipCache>true</skipCache>. This avoids any cache locking issues and simplifies the configuration.
<skipCache>true</skipCache>
| <cacheDirectory> | ||
| ${project.build.directory}/download-cache | ||
| </cacheDirectory> |
There was a problem hiding this comment.
Since <overwrite>true</overwrite> is configured, the plugin is already instructed to always download the latest version and overwrite the existing file, making caching completely redundant. Instead of configuring a custom cacheDirectory (which is deleted on mvn clean anyway), you can completely disable caching for this execution using <skipCache>true</skipCache>. This avoids any cache locking issues and simplifies the configuration.
<skipCache>true</skipCache>
| <cacheDirectory> | ||
| ${project.build.directory}/download-cache | ||
| </cacheDirectory> |
There was a problem hiding this comment.
Since <overwrite>true</overwrite> is configured, the plugin is already instructed to always download the latest version and overwrite the existing file, making caching completely redundant. Instead of configuring a custom cacheDirectory (which is deleted on mvn clean anyway), you can completely disable caching for this execution using <skipCache>true</skipCache>. This avoids any cache locking issues and simplifies the configuration.
<skipCache>true</skipCache>
There was a problem hiding this comment.
The changes look correct and effectively address the cache locking issue by setting <skipCache>true</skipCache> while maintaining the necessary overwrite behavior. This configuration is cleaner and avoids potential issues with shared cache directories in parallel build environments.
|
|



As observed in issue #13026, the download-maven-plugin's wget goal is currently flaky in release jobs. This change adjusts the configuration of the plugin everywhere it's used in the repo to skip caching. This way none of the jobs run during the release should be trying to acquire the same lock.
Fixes #13026