Languages
[Edit]
EN

Spring Boot - check Tomcat version (Maven command)

5 points
Created by:
Burhan-Boyce
458

In this short article, we would liek to show how to check Tomcat version in Spring Boot Web Application project using Maven command.

Quick solution (type in the command line):

mvn dependency:tree | grep tomcat

Hint: to know how to check standalone Tomcat server version check this article.

 

Practical example

In this section, we use Spring Boot 3 project.

Simple steps:

  1. open command line in the project directory,
  2. run Maven command:
    mvn dependency:tree | grep tomcat

    Example console output (Tomcat dependencies):
    [INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:3.0.0-RC2:compile
    [INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:10.1.1:compile
    [INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.1:compile
    [INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:10.1.1:compile
    Used Tomcat version: 10.1.1

 

mvn dependency:tree command

In this section, we use mvn dependency:tree command on Spring Boot 3 project to show how dependencies looks. The command prints dependencies as tree.

Example console output:

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:3.3.0:tree (default-cli) @ demo ---
[INFO] com.example:demo:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:3.0.0-RC2:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:3.0.0-RC2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:3.0.0-RC2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:3.0.0-RC2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:3.0.0-RC2:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.4.4:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.4.4:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.19.0:compile
[INFO] |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:2.0.3:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.33:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:3.0.0-RC2:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.14.0-rc3:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.14.0-rc3:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.14.0-rc3:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.14.0-rc3:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.14.0-rc3:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.14.0-rc3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:3.0.0-RC2:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:10.1.1:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.1:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:10.1.1:compile
[INFO] |  +- org.springframework:spring-web:jar:6.0.0-RC4:compile
[INFO] |  |  +- org.springframework:spring-beans:jar:6.0.0-RC4:compile
[INFO] |  |  \- io.micrometer:micrometer-observation:jar:1.10.0:compile
[INFO] |  |     \- io.micrometer:micrometer-commons:jar:1.10.0:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:6.0.0-RC4:compile
[INFO] |     +- org.springframework:spring-aop:jar:6.0.0-RC4:compile
[INFO] |     +- org.springframework:spring-context:jar:6.0.0-RC4:compile
[INFO] |     \- org.springframework:spring-expression:jar:6.0.0-RC4:compile
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:3.0.0-RC2:test
[INFO]    +- org.springframework.boot:spring-boot-test:jar:3.0.0-RC2:test
[INFO]    +- org.springframework.boot:spring-boot-test-autoconfigure:jar:3.0.0-RC2:test
[INFO]    +- com.jayway.jsonpath:json-path:jar:2.7.0:test
[INFO]    |  +- net.minidev:json-smart:jar:2.4.8:test
[INFO]    |  |  \- net.minidev:accessors-smart:jar:2.4.8:test
[INFO]    |  |     \- org.ow2.asm:asm:jar:9.1:test
[INFO]    |  \- org.slf4j:slf4j-api:jar:2.0.3:compile
[INFO]    +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.0:test
[INFO]    |  \- jakarta.activation:jakarta.activation-api:jar:2.1.0:test
[INFO]    +- org.assertj:assertj-core:jar:3.23.1:test
[INFO]    |  \- net.bytebuddy:byte-buddy:jar:1.12.18:test
[INFO]    +- org.hamcrest:hamcrest:jar:2.2:test
[INFO]    +- org.junit.jupiter:junit-jupiter:jar:5.9.1:test
[INFO]    |  +- org.junit.jupiter:junit-jupiter-api:jar:5.9.1:test
[INFO]    |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO]    |  |  +- org.junit.platform:junit-platform-commons:jar:1.9.1:test
[INFO]    |  |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO]    |  +- org.junit.jupiter:junit-jupiter-params:jar:5.9.1:test
[INFO]    |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.9.1:test
[INFO]    |     \- org.junit.platform:junit-platform-engine:jar:1.9.1:test
[INFO]    +- org.mockito:mockito-core:jar:4.8.1:test
[INFO]    |  +- net.bytebuddy:byte-buddy-agent:jar:1.12.18:test
[INFO]    |  \- org.objenesis:objenesis:jar:3.2:test
[INFO]    +- org.mockito:mockito-junit-jupiter:jar:4.8.1:test
[INFO]    +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO]    |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO]    +- org.springframework:spring-core:jar:6.0.0-RC4:compile
[INFO]    |  \- org.springframework:spring-jcl:jar:6.0.0-RC4:compile
[INFO]    +- org.springframework:spring-test:jar:6.0.0-RC4:test
[INFO]    \- org.xmlunit:xmlunit-core:jar:2.9.0:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.268 s
[INFO] Finished at: 2022-11-24T13:27:32+01:00
[INFO] ------------------------------------------------------------------------

 

See also

  1. Bash - how to check Tomcat server version?

Alternative titles

  1. Spring Boot - check Tomcat version (mvn command)
  2. Spring Boot - checking Tomcat version (Maven command)
  3. Spring Boot - checking Tomcat version (mvn command)
  4. Spring Boot - print Tomcat version (Maven command)
  5. Spring Boot - print Tomcat version (mvn command)
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join