Closed matrei closed 4 days ago
@matrei yeah, unfortunately now the plugins have the burden of resolving the servlet-api
. I don't think there is a way to make it transitive, but compile only?
Due to AST transformations. Any plugin that has a TagLib or Controller will need the servlet-api added in order to be able to compile it.
Quick question before you merge, should we be resolving the servlet-api and other versions from the bom instead?
I don't think there is a way to make it transitive, but compile only?
Isn't that what the compileOnlyApi
scope is for?
I don't think there is a way to make it transitive, but compile only?
Isn't that what the
compileOnlyApi
scope is for?
that's why I was asking. yeah, that looks like the best path..
The goal is to minimize dependency resolution and dependency imports. We have way too many dependency imports in our starter app that should not be needed.
We really need to create a list of plugins that use AST transforms and identify what imports they need specific to those transforms. Those would probably be the only location for compileOnlyApi.
Either way the servlet-api is going to be needed for
And there are no ast transforms or traits in this class that will propagate the resolution of the servlet-api
The
jakarta-servlet-api
was previously included as a transitive dependency, but it is no longer available through that path. To resolve the issue, this commit explicitly addsjakarta-servlet-api
as acompileOnly
dependency to ensure the necessary classes are available during compilation without bundling them into the final artifact.Also change scopes of
groovy
andgrails-core
dependencies tocompileOnly
as these will always be provided to a grails plugin.