Skip to content

Remove dependency to Spring Boot #1164

@fmbenhassine

Description

@fmbenhassine

As of v3.4, spring-shell-core depends on spring-boot-starter-validation and transitively on spring-boot-starter. Here is the dependency tree for a test project that depends only on the core jar:

>./mvnw dependency:tree
[INFO] Scanning for projects...
[INFO] org.springframework.shell:shell-test:jar:1.0-SNAPSHOT
[INFO] \- org.springframework.shell:spring-shell-core:jar:3.4.0:compile
[INFO]    +- org.springframework:spring-core:jar:6.2.0:compile
[INFO]    |  \- org.springframework:spring-jcl:jar:6.2.0:compile
[INFO]    +- org.springframework.boot:spring-boot-starter-validation:jar:3.4.0:compile
[INFO]    |  +- org.springframework.boot:spring-boot-starter:jar:3.4.0:compile
[INFO]    |  |  +- org.springframework.boot:spring-boot:jar:3.4.0:compile
[INFO]    |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:3.4.0:compile
[INFO]    |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:3.4.0:compile
[INFO]    |  |  |  +- ch.qos.logback:logback-classic:jar:1.5.12:compile
[INFO]    |  |  |  |  +- ch.qos.logback:logback-core:jar:1.5.12:compile
[INFO]    |  |  |  |  \- org.slf4j:slf4j-api:jar:2.0.15:compile
[INFO]    |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.24.1:compile
[INFO]    |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.24.1:compile
[INFO]    |  |  |  \- org.slf4j:jul-to-slf4j:jar:2.0.16:compile
[INFO]    |  |  +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO]    |  |  \- org.yaml:snakeyaml:jar:2.3:compile
[INFO]    |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.33:compile
[INFO]    |  \- org.hibernate.validator:hibernate-validator:jar:8.0.1.Final:compile
[INFO]    |     +- jakarta.validation:jakarta.validation-api:jar:3.0.2:compile
[INFO]    |     +- org.jboss.logging:jboss-logging:jar:3.4.3.Final:compile
[INFO]    |     \- com.fasterxml:classmate:jar:1.5.1:compile
[INFO]    +- org.springframework:spring-messaging:jar:6.2.0:compile
[INFO]    |  \- org.springframework:spring-beans:jar:6.2.0:compile
[INFO]    +- io.projectreactor:reactor-core:jar:3.7.0:compile
[INFO]    |  \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO]    +- org.jline:jline-console:jar:3.26.3:compile
[INFO]    |  \- org.jline:jline-builtins:jar:3.26.3:compile
[INFO]    +- org.jline:jline-reader:jar:3.26.3:compile
[INFO]    +- org.jline:jline-style:jar:3.26.3:compile
[INFO]    +- org.jline:jline-terminal:jar:3.26.3:compile
[INFO]    |  \- org.jline:jline-native:jar:3.26.3:compile
[INFO]    +- org.antlr:ST4:jar:4.3.4:compile
[INFO]    |  \- org.antlr:antlr-runtime:jar:3.5.3:compile
[INFO]    +- commons-io:commons-io:jar:2.18.0:compile
[INFO]    \- org.springframework.shell:spring-shell-table:jar:3.4.0:runtime
[INFO]       \- org.springframework:spring-context:jar:6.2.0:compile
[INFO]          +- org.springframework:spring-aop:jar:6.2.0:compile
[INFO]          +- org.springframework:spring-expression:jar:6.2.0:compile
[INFO]          \- io.micrometer:micrometer-observation:jar:1.14.0:compile
[INFO]             \- io.micrometer:micrometer-commons:jar:1.14.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.947 s
[INFO] Finished at: 2025-04-23T14:55:22+02:00
[INFO] ------------------------------------------------------------------------

The core jar should not depend on Boot. Only the autoconfigure module can depend on Boot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions