2

My Spring boot application has the following maven dependencies. But it adds lots of extra dependencies. I believe I don't need many of them. How can I remove those dependencies I don't need? pom.xml is attached.

     <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <!--WebJars -->
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootstrap</artifactId>
            <version>3.3.4</version>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>2.1.4</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
    </dependencies>

enter image description here enter image description here

Rahbee Alvee
  • 1,924
  • 7
  • 26
  • 42
  • 4
    Please refer to http://stackoverflow.com/questions/1517611/is-there-a-simple-way-to-remove-unused-dependencies-from-a-maven-pom-xml – Tunaki Nov 13 '16 at 23:56
  • Thanks Tunaki this is really helpful – Rahbee Alvee Nov 14 '16 at 00:58
  • Tell us what you want your app to do and we can point out dependencies you don't need. – Kyle Anderson Nov 14 '16 at 01:48
  • Please, take a look also to this question's answer to see if it helps you. It explains how to generate a default spring boot executable package as well as a deployable file with only the needed dependencies: http://stackoverflow.com/questions/37961730/spring-boot-exclude-dependencies-on-packaging/37966575#37966575 – Cèsar Nov 14 '16 at 06:33

0 Answers0