-
Notifications
You must be signed in to change notification settings - Fork 951
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
Produced web application archive (gradle assemble) contains a lot of unnecessary dependencies #12183
Comments
FYI... If you review the Gradle dependency report in a project you can evaluate the paths to transitive dependencies which can be helpful in identifying things that need to be there and help identify things that likely don't need to be there. |
@jeffbrown Thank you for the suggestion. I tried to analyze a bit where the dependencies are coming from, but I am not 100% I did try to aggregate the relevant parts of I did run It seems like a lot of those dependencies are initially included by Also some dependencies are referenced in BOM-dependencies, but I presume those only define the versions of dependencies and will not actively pull them into the application. ant
picocli
junit
groovy-test-junit5
groovy-testng
spring-test
opentest4j
|
So, I am currently analyzing and upgrading some application dependencies, which appeared in our dependency check software. During the research I also discovered, that the resulting war file of a Grails application contains a lot of dependencies, which IMHO should not be part of a production web application artifact. For example, I personally would not expect it to contain anything that is related to CLI stuff or testing.
Some dependencies I found in the resulting artifact of a newly created Grails application were:
The list is not finite, there might be more.
This might also be related to #11753 which always includes H2 and HSQLDB even though it is not specified in
build.gradle
.Is this expected?
Or am I missing something in my train of thought?
Task List
Steps to Reproduce
sdk install grails 5.0.1
sdk use grails 5.0.1
grails create-app myapp
cd myapp
./gradlew assemble
Expected Behaviour
Production web archive should contain only necessary dependencies.
Actual Behaviour
Environment Information
The text was updated successfully, but these errors were encountered: