-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build cache for formatter/impsort/enforcer #38399
Conversation
<fileSets> | ||
<fileSet> | ||
<name>foo</name> | ||
<paths> | ||
<path>${project.basedir}/pom.xml</path> | ||
</paths> | ||
<normalization>RELATIVE_PATH</normalization> | ||
</fileSet> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jprinet I used your proposal except I restricted it to the pom file as really that's what all our enforcer rules are checking.
That being said, I have two questions:
- are the plugin dependencies taken into account in the cache key? We have rules that are inside a jar declared as a dependency. If the jar changes, will the cache be invalidated?
- some of our rules are inspecting the transitive dependencies so I would need to somehow include the classpath into the cache key. Is there a way to do that when the plugin doesn't expose it?
I saw the following for the kotlin-maven-plugin but these are properties from the plugin:
<fileSet>
<name>classpath</name>
<normalization>COMPILE_CLASSPATH</normalization>
</fileSet>
<fileSet>
<name>testClasspath</name>
<normalization>COMPILE_CLASSPATH</normalization>
</fileSet>
Is there a way to include the classpath jars into the cache key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the plugin dependencies taken into account in the cache key? We have rules that are inside a jar declared as a dependency. If the jar changes, will the cache be invalidated?
There is no default input, the plugin has to define it which is not the case apparently for the enforcer plugin
some of our rules are inspecting the transitive dependencies so I would need to somehow include the classpath into the cache key. Is there a way to do that when the plugin doesn't expose it?
The only way would be with the programmatic approach, nothing you can do with the XML configuration afaik.
We are doing that for the Quarkus build caching extension.
Replaced by #38416 as the enforcer will need to be handled in a Maven extension. |
This should be merged after #38396
Created as draft as I have a few questions for the Gradle team.