Skip to content
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

Reduce footprint of production jar #345

Open
codeconsole opened this issue Jul 29, 2024 · 3 comments
Open

Reduce footprint of production jar #345

codeconsole opened this issue Jul 29, 2024 · 3 comments

Comments

@codeconsole
Copy link
Contributor

grails create-app website results in a website.jar that is 146M

The premise of Micronaut is to not have a monolith app and by forcing it into Grails makes Grails more monolithic adding 13+ more dependencies (plus transitives) to a Grails application

 40K	micronaut-jackson-core-3.10.4.jar
 48K	micronaut-core-reactive-3.10.4.jar
 56K	micronaut-json-core-3.10.4.jar
 56K	micronaut-spring-4.5.1.jar
 80K	micronaut-spring-context-4.5.1.jar
 92K	micronaut-aop-3.10.4.jar
100K	micronaut-cache-core-3.5.0.jar
152K	micronaut-jackson-databind-3.10.4.jar
200K	micronaut-runtime-3.10.4.jar
232K	micronaut-context-3.10.4.jar
384K	micronaut-http-3.10.4.jar
976K	micronaut-inject-3.10.4.jar
1.6M	micronaut-core-3.10.4.jar
3.9M	total

Given the overwhelming lack of support for keeping Micronaut part of Grails, it should be removed or made optional.

The implications of keeping Micronaut in a production environment:

productionRuntimeClasspath
+--- org.grails:grails-core -> 6.2.0
|    +--- io.micronaut:micronaut-inject:3.10.4
|    |    +--- org.slf4j:slf4j-api:1.7.36
|    |    +--- javax.annotation:javax.annotation-api:1.3.2
|    |    +--- jakarta.inject:jakarta.inject-api:2.0.1
|    |    +--- jakarta.annotation:jakarta.annotation-api:2.1.1 -> 2.0.0
|    |    +--- io.micronaut:micronaut-core:3.10.4
|    |    |    \--- org.slf4j:slf4j-api:1.7.36
|    |    \--- org.yaml:snakeyaml:2.0 -> 2.2
|    +--- io.micronaut.spring:micronaut-spring-context:4.5.1
|    |    +--- io.micronaut.cache:micronaut-cache-core:3.5.0
|    |    |    +--- io.projectreactor:reactor-core:3.4.21 -> 3.4.34
|    |    |    |    \--- org.reactivestreams:reactive-streams:1.0.4
|    |    |    +--- io.micronaut:micronaut-bom:3.5.4 -> 3.10.4
|    |    |    |    +--- org.codehaus.groovy:groovy-bom:3.0.13
|    |    |    |    |    +--- org.codehaus.groovy:groovy:3.0.13 -> 3.0.21 (c)
|    |    |    |    |    +--- org.codehaus.groovy:groovy-ant:3.0.13 -> 3.0.21 (c)
|    |    |    |    |    +--- org.codehaus.groovy:groovy-groovydoc:3.0.13 -> 3.0.19 (c)
|    |    |    |    |    +--- org.codehaus.groovy:groovy-json:3.0.13 -> 3.0.21 (c)
|    |    |    |    |    +--- org.codehaus.groovy:groovy-sql:3.0.13 -> 3.0.21 (c)
|    |    |    |    |    +--- org.codehaus.groovy:groovy-templates:3.0.13 -> 3.0.21 (c)
|    |    |    |    |    \--- org.codehaus.groovy:groovy-xml:3.0.13 -> 3.0.21 (c)
|    |    |    |    +--- com.fasterxml.jackson:jackson-bom:2.15.0
|    |    |    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.15.0 -> 2.13.5 (c)
|    |    |    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.15.0 -> 2.13.5 (c)
|    |    |    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.15.0 -> 2.13.5 (c)
|    |    |    |    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.0 -> 2.13.5 (c)
|    |    |    |    |    \--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0 -> 2.13.5 (c)
|    |    |    |    +--- org.junit:junit-bom:5.9.1 -> 5.9.2
|    |    |    |    +--- org.jetbrains.kotlin:kotlin-bom:1.6.21
|    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.5.1
|    |    |    |    +--- io.ktor:ktor-bom:1.6.8
|    |    |    |    +--- org.apache.logging.log4j:log4j-bom:2.19.0
|    |    |    |    |    +--- org.apache.logging.log4j:log4j-api:2.19.0 -> 2.17.2 (c)
|    |    |    |    |    \--- org.apache.logging.log4j:log4j-to-slf4j:2.19.0 -> 2.17.2 (c)
|    |    |    |    +--- io.micrometer:micrometer-bom:1.10.5
|    |    |    |    |    \--- io.micrometer:micrometer-core:1.10.5 -> 1.9.17 (c)
|    |    |    |    +--- io.micronaut.aws:micronaut-aws-bom:3.18.0
|    |    |    |    |    +--- com.amazonaws:aws-java-sdk-bom:1.12.510
|    |    |    |    |    +--- software.amazon.awssdk:bom:2.20.107
|    |    |    |    |    \--- org.slf4j:jcl-over-slf4j:1.7.36 (c)
|    |    |    |    +--- io.micronaut.azure:micronaut-azure-bom:4.2.0
|    |    |    |    |    \--- com.azure:azure-sdk-bom:1.2.15
|    |    |    |    +--- io.micronaut.cache:micronaut-cache-bom:3.5.0
|    |    |    |    |    +--- com.github.ben-manes.caffeine:caffeine:2.9.3 (c)
|    |    |    |    |    \--- io.micronaut.cache:micronaut-cache-core:3.5.0 (c)
|    |    |    |    +--- io.micronaut.coherence:micronaut-coherence-bom:3.7.2
|    |    |    |    |    \--- com.oracle.coherence.ce:coherence-bom:22.06.2
|    |    |    |    +--- io.micronaut.crac:micronaut-crac-bom:1.2.3
|    |    |    |    +--- io.micronaut.data:micronaut-data-bom:3.10.0
|    |    |    |    +--- io.micronaut.discovery:micronaut-discovery-client-bom:3.3.1
|    |    |    |    +--- io.micronaut.email:micronaut-email-bom:1.5.0
|    |    |    |    +--- io.micronaut.flyway:micronaut-flyway-bom:5.5.0
|    |    |    |    +--- io.micronaut.gcp:micronaut-gcp-bom:4.11.0
|    |    |    |    +--- io.micronaut.groovy:micronaut-groovy-bom:3.4.0
|    |    |    |    |    \--- org.codehaus.groovy:groovy-bom:3.0.13 (*)
|    |    |    |    +--- io.micronaut.grpc:micronaut-grpc-bom:3.6.0
|    |    |    |    |    +--- io.grpc:grpc-bom:1.54.0
|    |    |    |    |    \--- com.google.protobuf:protobuf-bom:3.21.12
|    |    |    |    +--- io.micronaut.beanvalidation:micronaut-hibernate-validator-bom:3.3.0
|    |    |    |    +--- io.micronaut.jaxrs:micronaut-jaxrs-bom:3.4.0
|    |    |    |    +--- io.micronaut.jmx:micronaut-jmx-bom:3.2.0
|    |    |    |    +--- io.micronaut.kafka:micronaut-kafka-bom:4.5.5
|    |    |    |    +--- io.micronaut.kotlin:micronaut-kotlin-bom:3.2.2
|    |    |    |    +--- io.micronaut.kubernetes:micronaut-kubernetes-bom:4.0.1
|    |    |    |    +--- io.micronaut.liquibase:micronaut-liquibase-bom:5.7.2
|    |    |    |    +--- io.micronaut.micrometer:micronaut-micrometer-bom:4.8.3
|    |    |    |    |    +--- io.micrometer:micrometer-bom:1.10.5 (*)
|    |    |    |    |    \--- io.micrometer:micrometer-core:1.10.5 -> 1.9.17 (c)
|    |    |    |    +--- io.micronaut.microstream:micronaut-microstream-bom:1.3.0
|    |    |    |    +--- io.micronaut.mongodb:micronaut-mongo-bom:4.6.0
|    |    |    |    +--- io.micronaut.mqtt:micronaut-mqtt-bom:2.3.0
|    |    |    |    +--- io.micronaut.objectstorage:micronaut-object-storage-bom:1.1.0
|    |    |    |    +--- io.micronaut.openapi:micronaut-openapi-bom:4.8.7
|    |    |    |    +--- io.micronaut.oraclecloud:micronaut-oraclecloud-bom:2.3.4
|    |    |    |    +--- io.micronaut.picocli:micronaut-picocli-bom:4.4.0
|    |    |    |    +--- io.micronaut.problem:micronaut-problem-json-bom:2.6.0
|    |    |    |    +--- io.micronaut.r2dbc:micronaut-r2dbc-bom:4.0.0
|    |    |    |    |    \--- org.testcontainers:testcontainers-bom:1.17.3 -> 1.17.6
|    |    |    |    +--- io.micronaut.rabbitmq:micronaut-rabbitmq-bom:3.4.1
|    |    |    |    +--- io.micronaut.reactor:micronaut-reactor-bom:2.6.0
|    |    |    |    |    \--- io.projectreactor:reactor-core:3.5.0 -> 3.4.34 (c)
|    |    |    |    +--- io.micronaut.redis:micronaut-redis-bom:5.4.0
|    |    |    |    +--- io.micronaut.rxjava2:micronaut-rxjava2-bom:1.3.0
|    |    |    |    +--- io.micronaut.rxjava3:micronaut-rxjava3-bom:2.4.1
|    |    |    |    +--- io.micronaut.security:micronaut-security-bom:3.11.1
|    |    |    |    +--- io.micronaut.serde:micronaut-serde-bom:1.5.3
|    |    |    |    +--- io.micronaut.servlet:micronaut-servlet-bom:3.3.8
|    |    |    |    |    \--- javax.servlet:javax.servlet-api:4.0.1 (c)
|    |    |    |    +--- io.micronaut.spring:micronaut-spring-bom:4.5.1
|    |    |    |    |    +--- org.springframework:spring-framework-bom:5.3.25
|    |    |    |    |    |    +--- org.springframework:spring-aop:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-beans:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-context:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-context-support:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-core:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-expression:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-jcl:5.3.25 -> 5.3.31 (c)
|    |    |    |    |    |    +--- org.springframework:spring-jdbc:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-orm:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-test:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-tx:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    +--- org.springframework:spring-web:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    |    \--- org.springframework:spring-webmvc:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    +--- org.springframework:spring-core:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    +--- org.springframework.boot:spring-boot:2.7.7 -> 2.7.18 (c)
|    |    |    |    |    +--- org.springframework.boot:spring-boot-starter:2.7.7 -> 2.7.18 (c)
|    |    |    |    |    +--- org.springframework:spring-context:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    +--- org.springframework:spring-jdbc:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    +--- org.springframework:spring-orm:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    +--- org.springframework:spring-tx:5.3.25 -> 5.3.33 (c)
|    |    |    |    |    +--- io.micronaut.spring:micronaut-spring:4.5.1 (c)
|    |    |    |    |    \--- io.micronaut.spring:micronaut-spring-context:4.5.1 (c)
|    |    |    |    +--- io.micronaut.sql:micronaut-sql-bom:4.8.1
|    |    |    |    |    +--- org.jdbi:jdbi3-bom:3.30.0
|    |    |    |    |    +--- com.h2database:h2:1.4.200 -> 2.2.224 (c)
|    |    |    |    |    +--- org.hibernate:hibernate-core:5.6.15.Final (c)
|    |    |    |    |    \--- org.apache.tomcat:tomcat-jdbc:10.0.23 -> 9.0.83 (c)
|    |    |    |    +--- io.micronaut.test:micronaut-test-bom:3.9.2
|    |    |    |    |    +--- org.junit:junit-bom:5.9.2
|    |    |    |    |    +--- io.rest-assured:rest-assured-bom:5.3.0
|    |    |    |    |    +--- org.spockframework:spock-bom:2.1-groovy-3.0
|    |    |    |    |    \--- org.hamcrest:hamcrest:2.2 (c)
|    |    |    |    +--- io.micronaut.testresources:micronaut-test-resources-bom:1.2.5
|    |    |    |    |    \--- org.testcontainers:testcontainers-bom:1.17.6
|    |    |    |    +--- io.micronaut.tracing:micronaut-tracing-bom:4.5.0
|    |    |    |    |    +--- io.zipkin.brave:brave-bom:5.14.1
|    |    |    |    |    +--- io.opentelemetry:opentelemetry-bom:1.19.0
|    |    |    |    |    +--- io.opentelemetry:opentelemetry-bom-alpha:1.19.0-alpha
|    |    |    |    |    |    \--- io.opentelemetry:opentelemetry-bom:1.19.0
|    |    |    |    |    +--- io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.19.2
|    |    |    |    |    |    \--- io.opentelemetry:opentelemetry-bom:1.19.0
|    |    |    |    |    +--- io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.19.2-alpha
|    |    |    |    |    |    +--- io.opentelemetry:opentelemetry-bom:1.19.0
|    |    |    |    |    |    +--- io.opentelemetry:opentelemetry-bom-alpha:1.19.0-alpha (*)
|    |    |    |    |    |    \--- io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.19.2 (*)
|    |    |    |    |    \--- io.zipkin.reporter2:zipkin-reporter-bom:2.16.3
|    |    |    |    +--- io.micronaut.views:micronaut-views-bom:3.8.2
|    |    |    |    +--- io.netty:netty-bom:4.1.108.Final
|    |    |    |    +--- org.testcontainers:testcontainers-bom:1.17.5 -> 1.17.6
|    |    |    |    +--- org.grails:grails-datastore-core:7.3.2 -> 8.1.2 (c)
|    |    |    |    +--- org.grails:grails-datastore-gorm:7.3.2 -> 8.1.2 (c)
|    |    |    |    +--- org.grails:grails-datastore-gorm-support:7.3.2 -> 8.1.2 (c)
|    |    |    |    +--- org.grails:grails-datastore-gorm-validation:7.3.2 -> 8.1.2 (c)
|    |    |    |    +--- org.grails:grails-datastore-web:7.3.2 -> 8.1.2 (c)
|    |    |    |    +--- org.grails:grails-datastore-gorm-hibernate5:7.3.0 -> 8.1.0 (c)
|    |    |    |    +--- org.graalvm.sdk:graal-sdk:22.0.0.2 (c)
|    |    |    |    +--- org.codehaus.groovy:groovy:3.0.13 -> 3.0.21 (c)
|    |    |    |    +--- org.codehaus.groovy:groovy-json:3.0.13 -> 3.0.21 (c)
|    |    |    |    +--- org.codehaus.groovy:groovy-sql:3.0.13 -> 3.0.21 (c)
|    |    |    |    +--- org.codehaus.groovy:groovy-templates:3.0.13 -> 3.0.21 (c)
|    |    |    |    +--- com.h2database:h2:1.4.200 -> 2.2.224 (c)
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.15.0 -> 2.13.5 (c)
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.15.0 -> 2.13.5 (c)
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.15.0 -> 2.13.5 (c)
|    |    |    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.0 -> 2.13.5 (c)
|    |    |    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0 -> 2.13.5 (c)
|    |    |    |    +--- jakarta.annotation:jakarta.annotation-api:2.1.1 -> 2.0.0 (c)
|    |    |    |    +--- javax.annotation:javax.annotation-api:1.3.2 (c)
|    |    |    |    +--- ch.qos.logback:logback-classic:1.2.11 -> 1.2.12 (c)
|    |    |    |    +--- ch.qos.logback:logback-core:1.2.11 -> 1.2.12 (c)
|    |    |    |    +--- io.micrometer:micrometer-core:1.10.5 -> 1.9.17 (c)
|    |    |    |    +--- io.micronaut.test:micronaut-test-bom:3.9.2 (c)
|    |    |    |    +--- org.reactivestreams:reactive-streams:1.0.4 (c)
|    |    |    |    +--- io.projectreactor:reactor-core:3.5.0 -> 3.4.34 (c)
|    |    |    |    +--- org.slf4j:slf4j-api:1.7.36 (c)
|    |    |    |    +--- org.slf4j:jcl-over-slf4j:1.7.36 (c)
|    |    |    |    +--- org.slf4j:jul-to-slf4j:1.7.36 (c)
|    |    |    |    +--- org.yaml:snakeyaml:2.0 -> 2.2 (c)
|    |    |    |    +--- org.springframework:spring-core:5.3.23 -> 5.3.33 (c)
|    |    |    |    +--- javax.validation:validation-api:2.0.1.Final (c)
|    |    |    |    +--- io.micronaut:micronaut-aop:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-context:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-core:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-core-reactive:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-http:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-inject:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-jackson-core:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-jackson-databind:3.10.4 (c)
|    |    |    |    +--- io.micronaut:micronaut-json-core:3.10.4 (c)
|    |    |    |    \--- io.micronaut:micronaut-runtime:3.10.4 (c)
|    |    |    +--- io.micronaut:micronaut-inject:3.5.4 -> 3.10.4 (*)
|    |    |    +--- io.micronaut:micronaut-aop:3.5.4 -> 3.10.4
|    |    |    |    +--- org.slf4j:slf4j-api:1.7.36
|    |    |    |    +--- io.micronaut:micronaut-inject:3.10.4 (*)
|    |    |    |    \--- io.micronaut:micronaut-core:3.10.4 (*)
|    |    |    +--- io.micronaut:micronaut-http:3.5.4 -> 3.10.4
|    |    |    |    +--- io.projectreactor:reactor-core:3.5.0 -> 3.4.34 (*)
|    |    |    |    +--- org.slf4j:slf4j-api:1.7.36
|    |    |    |    +--- io.micronaut:micronaut-inject:3.10.4 (*)
|    |    |    |    \--- io.micronaut:micronaut-core-reactive:3.10.4
|    |    |    |         +--- org.slf4j:slf4j-api:1.7.36
|    |    |    |         +--- io.micronaut:micronaut-core:3.10.4 (*)
|    |    |    |         \--- org.reactivestreams:reactive-streams:1.0.4
|    |    |    \--- io.micronaut:micronaut-runtime:3.5.4 -> 3.10.4
|    |    |         +--- org.slf4j:slf4j-api:1.7.36
|    |    |         +--- io.micronaut:micronaut-http:3.10.4 (*)
|    |    |         +--- io.micronaut:micronaut-inject:3.10.4 (*)
|    |    |         +--- io.micronaut:micronaut-aop:3.10.4 (*)
|    |    |         +--- io.micronaut:micronaut-context:3.10.4
|    |    |         |    +--- org.slf4j:slf4j-api:1.7.36
|    |    |         |    +--- io.micronaut:micronaut-inject:3.10.4 (*)
|    |    |         |    +--- io.micronaut:micronaut-aop:3.10.4 (*)
|    |    |         |    \--- javax.validation:validation-api:2.0.1.Final
|    |    |         +--- io.micronaut:micronaut-core-reactive:3.10.4 (*)
|    |    |         +--- io.micronaut:micronaut-jackson-databind:3.10.4
|    |    |         |    +--- org.slf4j:slf4j-api:1.7.36
|    |    |         |    +--- io.micronaut:micronaut-jackson-core:3.10.4
|    |    |         |    |    +--- org.slf4j:slf4j-api:1.7.36
|    |    |         |    |    +--- io.micronaut:micronaut-json-core:3.10.4
|    |    |         |    |    |    +--- org.slf4j:slf4j-api:1.7.36
|    |    |         |    |    |    +--- io.micronaut:micronaut-context:3.10.4 (*)
|    |    |         |    |    |    \--- io.micronaut:micronaut-http:3.10.4 (*)
|    |    |         |    |    +--- com.fasterxml.jackson.core:jackson-core:2.15.0 -> 2.13.5
|    |    |         |    |    |    \--- com.fasterxml.jackson:jackson-bom:2.13.5 -> 2.15.0 (*)
|    |    |         |    |    \--- com.fasterxml.jackson.core:jackson-annotations:2.15.0 -> 2.13.5
|    |    |         |    |         \--- com.fasterxml.jackson:jackson-bom:2.13.5 -> 2.15.0 (*)
|    |    |         |    +--- com.fasterxml.jackson.core:jackson-databind:2.15.0 -> 2.13.5
|    |    |         |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.13.5 (*)
|    |    |         |    |    +--- com.fasterxml.jackson.core:jackson-core:2.13.5 (*)
|    |    |         |    |    \--- com.fasterxml.jackson:jackson-bom:2.13.5 -> 2.15.0 (*)
|    |    |         |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.0 -> 2.13.5
|    |    |         |    |    +--- com.fasterxml.jackson.core:jackson-core:2.13.5 (*)
|    |    |         |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.13.5 (*)
|    |    |         |    |    \--- com.fasterxml.jackson:jackson-bom:2.13.5 -> 2.15.0 (*)
|    |    |         |    \--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0 -> 2.13.5
|    |    |         |         +--- com.fasterxml.jackson.core:jackson-annotations:2.13.5 (*)
|    |    |         |         +--- com.fasterxml.jackson.core:jackson-core:2.13.5 (*)
|    |    |         |         +--- com.fasterxml.jackson.core:jackson-databind:2.13.5 (*)
|    |    |         |         \--- com.fasterxml.jackson:jackson-bom:2.13.5 -> 2.15.0 (*)
|    |    |         +--- javax.validation:validation-api:2.0.1.Final
|    |    |         \--- io.projectreactor:reactor-core:3.5.0 -> 3.4.34 (*)
|    |    +--- io.micronaut:micronaut-bom:3.8.1 -> 3.10.4 (*)
|    |    +--- io.micronaut:micronaut-inject:3.8.1 -> 3.10.4 (*)
|    |    +--- io.micronaut:micronaut-aop:3.8.1 -> 3.10.4 (*)
|    |    \--- io.micronaut.spring:micronaut-spring:4.5.1
|    |         +--- io.micronaut:micronaut-bom:3.8.1 -> 3.10.4 (*)
|    |         +--- io.micronaut:micronaut-inject:3.8.1 -> 3.10.4 (*)
|    |         +--- org.springframework:spring-framework-bom:5.3.25 (*)
|    |         +--- org.springframework:spring-core:5.3.25 -> 5.3.33 (*)
|    |         +--- org.springframework:spring-tx:5.3.25 -> 5.3.33
|    |         |    +--- org.springframework:spring-beans:5.3.33 (*)
|    |         |    \--- org.springframework:spring-core:5.3.33 (*)
|    |         +--- org.springframework:spring-context:5.3.25 -> 5.3.33 (*)
|    |         \--- io.micronaut:micronaut-aop:3.8.1 -> 3.1e0.4 (*)
|    +--- io.micronaut.cache:micronaut-cache-core:3.5.0 (*)
|    +--- io.micronaut:micronaut-runtime:3.10.4 (*)
|    +--- org.grails:grails-bootstrap:6.2.0
|    |    \--- io.micronaut:micronaut-inject:3.10.4 (*)

Furthermore, creating a Spring Boot app requires a couple of dependencies in build.gradle to get up and going. Why does the most basic grails-app start with 36?

We also need to explore dependency reduction. If a dependency is transitive on another dependency, why is it in build.gradle? It is going to be resolved either way.

6.2.1 build.gradle

    implementation("org.grails:grails-core")
    implementation("org.grails:grails-logging")
    implementation("org.grails:grails-plugin-databinding")
    implementation("org.grails:grails-plugin-i18n")
    implementation("org.grails:grails-plugin-interceptors")
    implementation("org.grails:grails-plugin-rest")
    implementation("org.grails:grails-plugin-services")
    implementation("org.grails:grails-plugin-url-mappings")
    implementation("org.grails:grails-web-boot")
    implementation("org.grails.plugins:gsp")
    implementation("org.grails.plugins:hibernate5")
    implementation("org.grails.plugins:scaffolding")
    implementation("org.springframework.boot:spring-boot-autoconfigure")
    implementation("org.springframework.boot:spring-boot-starter")
    implementation("org.springframework.boot:spring-boot-starter-actuator")
    implementation("org.springframework.boot:spring-boot-starter-logging")
    implementation("org.springframework.boot:spring-boot-starter-tomcat")
    implementation("org.springframework.boot:spring-boot-starter-validation")
    compileOnly("io.micronaut:micronaut-inject-groovy")
    console("org.grails:grails-console")
    runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:4.3.0")
    runtimeOnly("com.h2database:h2")
    runtimeOnly("org.apache.tomcat:tomcat-jdbc")
    runtimeOnly("org.fusesource.jansi:jansi:1.18")
    testImplementation("io.micronaut:micronaut-inject-groovy")
    testImplementation("org.grails:grails-gorm-testing-support")
    testImplementation("org.grails:grails-web-testing-support")
    testImplementation("org.grails.plugins:geb")
    testImplementation("org.seleniumhq.selenium:selenium-api:4.19.1")
    testImplementation("org.seleniumhq.selenium:selenium-remote-driver:4.19.1")
    testImplementation("org.seleniumhq.selenium:selenium-support:4.19.1")
    testImplementation("org.spockframework:spock-core")
    testRuntimeOnly("org.seleniumhq.selenium:selenium-chrome-driver:4.19.1")
    testRuntimeOnly("org.seleniumhq.selenium:selenium-firefox-driver:4.19.1")
    testRuntimeOnly("org.seleniumhq.selenium:selenium-safari-driver:4.19.1")
    testImplementation("io.micronaut:micronaut-http-client")

Results in a production jar with 173 jars

% du -csh *| sort -h
 4.0K	grails-logging-6.2.0.jar
4.0K	grails-web-fileupload-6.2.0.jar
4.0K	hamcrest-core-2.2.jar
4.0K	javax.inject-1.jar
8.0K	events-5.0.2.jar
8.0K	grails-web-boot-6.2.0.jar
8.0K	jul-to-slf4j-1.7.36.jar
 12K	ant-antlr-1.10.14.jar
 12K	grails-datastore-web-8.1.2.jar
 12K	jakarta.inject-api-2.0.1.jar
 12K	reactive-streams-1.0.4.jar
 16K	error_prone_annotations-2.10.0.jar
 16K	grails-datastore-gorm-support-8.1.2.jar
 16K	grails-plugin-i18n-6.2.0.jar
 16K	grails-web-gsp-taglib-6.2.1.jar
 16K	jta-1.1.jar
 20K	ant-launcher-1.10.14.jar
 20K	grails-events-compat-5.0.2.jar
 20K	grails-plugin-services-6.2.0.jar
 20K	jcl-over-slf4j-1.7.36.jar
 20K	log4j-to-slf4j-2.17.2.jar
 24K	grails-codecs-6.2.0.jar
 24K	grails-plugin-domain-class-6.2.0.jar
 24K	grails-plugin-url-mappings-6.2.0.jar
 24K	grails-plugin-validation-6.2.0.jar
 24K	grails-web-6.2.0.jar
 24K	grails-web-mvc-6.2.0.jar
 28K	angus-activation-2.0.2.jar
 28K	grails-plugin-codecs-6.2.0.jar
 28K	grails-plugin-datasource-6.2.0.jar
 28K	jakarta.annotation-api-2.0.0.jar
 28K	javax.annotation-api-1.3.2.jar
 28K	jboss-transaction-api_1.2_spec-1.1.1.Final.jar
 28K	spring-jcl-5.3.31.jar
 32K	LatencyUtils-2.0.3.jar
 32K	grails-events-transform-5.0.2.jar
 32K	istack-commons-runtime-3.0.12.jar
 32K	spring-boot-jarmode-layertools-2.7.18.jar
 36K	grails-web-taglib-6.2.1.jar
 36K	jackson-datatype-jdk8-2.13.5.jar
 40K	grails-plugin-interceptors-6.2.0.jar
 40K	grails-spring-6.2.0.jar
 40K	micronaut-jackson-core-3.10.4.jar
 44K	grails-web-sitemesh-6.2.1.jar
 44K	slf4j-api-1.7.36.jar
 48K	jakarta.activation-api-1.2.2.jar
 48K	micronaut-core-reactive-3.10.4.jar
 48K	sitemesh2-6.2.1-plain.jar
 52K	grails-events-5.0.2.jar
 52K	tomcat-juli-9.0.83.jar
 56K	javax.activation-api-1.2.0.jar
 56K	micronaut-json-core-3.10.4.jar
 56K	micronaut-spring-4.5.1.jar
 60K	async-5.0.2.jar
 60K	hibernate5-8.1.0-plain.jar
 60K	jboss-logging-3.4.3.Final.jar
 68K	classmate-1.5.1.jar
 68K	grails-async-5.0.2.jar
 68K	jakarta.activation-1.2.2.jar
 68K	js-scriptengine-22.0.0.2.jar
 72K	grails-plugin-mimetypes-6.2.0.jar
 72K	txw2-2.3.9.jar
 76K	commons-fileupload-1.5.jar
 76K	grails-databinding-6.2.0.jar
 76K	jackson-annotations-2.13.5.jar
 80K	groovy-sql-3.0.21.jar
 80K	hibernate-commons-annotations-5.1.2.Final.jar
 80K	javax.el-api-3.0.1-b06.jar
 80K	micronaut-spring-context-4.5.1.jar
 84K	groovy-ant-3.0.21.jar
 88K	grails-web-gsp-6.2.1.jar
 92K	grails-web-databinding-6.2.0.jar
 92K	groovy-templates-3.0.21.jar
 92K	jakarta.validation-api-2.0.2.jar
 92K	micronaut-aop-3.10.4.jar
 92K	scaffolding-5.0.1-plain.jar
 92K	validation-api-2.0.1.Final.jar
 96K	grails-datastore-gorm-validation-8.1.2.jar
 96K	grails-taglib-6.2.1.jar
 96K	javax.servlet-api-4.0.1.jar
100K	micronaut-cache-core-3.5.0.jar
108K	grails-plugin-controllers-6.2.0.jar
116K	jakarta.xml.bind-api-2.3.3.jar
120K	jackson-datatype-jsr310-2.13.5.jar
124K	hamcrest-2.2.jar
128K	groovy-json-3.0.21.jar
128K	jaxb-api-2.3.1.jar
136K	asset-pipeline-grails-4.3.0.jar
136K	grails-web-jsp-6.2.1.jar
140K	ant-junit-1.10.14.jar
140K	converters-5.0.0.jar
140K	fields-3.0.0.RC1.jar
152K	micronaut-jackson-databind-3.10.4.jar
152K	tomcat-jdbc-9.0.83.jar
160K	groovy-groovydoc-3.0.19.jar
164K	javax.persistence-api-2.2.jar
168K	grails-gsp-6.2.1.jar
172K	HdrHistogram-2.1.12.jar
172K	scaffolding-core-2.1.0.jar
180K	grails-web-common-6.2.0.jar
180K	sitemesh-2.4.4.jar
184K	spring-context-support-5.3.33.jar
188K	grails-encoder-6.2.0.jar
188K	grails-web-url-mappings-6.2.0.jar
192K	commons-validator-1.8.0.jar
200K	micronaut-runtime-3.10.4.jar
200K	spring-orm-5.3.33.jar
220K	checker-qual-3.19.0.jar
220K	grails-plugin-rest-6.2.0.jar
228K	jandex-2.4.2.Final.jar
228K	logback-classic-1.2.12.jar
232K	javax.el-3.0.1-b12.jar
232K	jaxb-core-4.0.5.jar
232K	micronaut-context-3.10.4.jar
256K	tomcat-embed-el-9.0.83.jar
264K	grails-bootstrap-6.2.0.jar
264K	jline-2.14.6.jar
280K	commons-lang-2.6.jar
280K	tomcat-embed-websocket-9.0.83.jar
284K	jansi-1.18.jar
288K	groovy-xml-3.0.21.jar
288K	spring-expression-5.3.33.jar
296K	log4j-api-2.17.2.jar
316K	grails-plugin-databinding-6.2.0.jar
320K	commons-io-2.11.0.jar
324K	gsp-6.2.1-plain.jar
328K	snakeyaml-2.2.jar
328K	spring-tx-5.3.33.jar
348K	commons-codec-1.15.jar
368K	jackson-core-2.13.5.jar
376K	junit-4.13.2.jar
376K	spring-aop-5.3.33.jar
384K	micronaut-http-3.10.4.jar
420K	spring-jdbc-5.3.33.jar
436K	antlr-2.7.7.jar
440K	logback-core-1.2.12.jar
548K	grails-datastore-gorm-hibernate5-8.1.0.jar
564K	spring-boot-actuator-autoconfigure-2.7.18.jar
576K	commons-collections-3.2.2.jar
576K	commons-lang3-3.12.0.jar
584K	grails-datastore-core-8.1.2.jar
612K	graal-sdk-22.0.0.2.jar
652K	micrometer-core-1.9.17.jar
676K	spring-boot-actuator-2.7.18.jar
692K	spring-beans-5.3.33.jar
752K	grails-core-6.2.0.jar
776K	spring-test-5.3.33.jar
780K	javassist-3.30.2-GA.jar
844K	asset-pipeline-core-4.3.0.jar
892K	caffeine-2.9.3.jar
904K	jaxb-impl-4.0.5.jar
960K	grails-datastore-gorm-8.1.2.jar
976K	micronaut-inject-3.10.4.jar
996K	jaxb-runtime-2.3.9.jar
1.0M	spring-webmvc-5.3.33.jar
1.2M	spring-context-5.3.33.jar
1.3M	hibernate-validator-6.2.5.Final.jar
1.4M	spring-boot-2.7.18.jar
1.4M	spring-core-5.3.33.jar
1.5M	jackson-databind-2.13.5.jar
1.6M	micronaut-core-3.10.4.jar
1.6M	spring-boot-autoconfigure-2.7.18.jar
1.6M	spring-web-5.3.33.jar
1.7M	reactor-core-3.4.34.jar
2.2M	ant-1.10.14.jar
2.5M	h2-2.2.224.jar
2.7M	regex-22.0.0.2.jar
3.4M	tomcat-embed-core-9.0.83.jar
3.8M	byte-buddy-1.12.23.jar
7.2M	hibernate-core-5.6.15.Final.jar
7.7M	groovy-3.0.21.jar
8.5M	truffle-api-22.0.0.2.jar
 48M	js-22.0.0.2.jar
129M	total
@codeconsole codeconsole converted this from a draft issue Jul 29, 2024
@codeconsole
Copy link
Contributor Author

grails/grails-core#13565

@codeconsole
Copy link
Contributor Author

@codeconsole codeconsole moved this from Todo to Done in Grails 7 Aug 2, 2024
@codeconsole codeconsole closed this as completed by moving to Done in Grails 7 Aug 2, 2024
@codeconsole codeconsole moved this from Done to In Progress in Grails 7 Aug 2, 2024
@codeconsole codeconsole reopened this Aug 2, 2024
@codeconsole
Copy link
Contributor Author

grails/grails-core#13746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant