jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.56k stars 4.02k forks source link

Generated maven pom has unused declared dependencies and used undeclared dependencies #22412

Closed damir78 closed 1 year ago

damir78 commented 1 year ago

How to reproduce: mvn dependency:analyze using the current jhipster sample app https://github.com/jhipster/jhipster-sample-app.git :

[WARNING] Used undeclared dependencies found: [WARNING] org.springframework.security:spring-security-config:jar:5.7.3:compile [WARNING] org.mockito:mockito-core:jar:4.5.1:test [WARNING] org.springframework.boot:spring-boot:jar:2.7.3:compile [WARNING] org.springframework:spring-web:jar:5.3.22:compile [WARNING] org.slf4j:slf4j-api:jar:1.7.36:compile [WARNING] org.springframework.security:spring-security-crypto:jar:5.7.3:compile [WARNING] org.springframework:spring-core:jar:5.3.22:compile [WARNING] org.zalando:problem:jar:0.26.0:compile [WARNING] org.mockito:mockito-junit-jupiter:jar:4.5.1:test [WARNING] org.springframework:spring-aop:jar:5.3.22:compile [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test [WARNING] com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.13.3:compile [WARNING] jakarta.servlet:jakarta.servlet-api:jar:4.0.4:compile [WARNING] ch.qos.logback:logback-core:jar:1.2.11:compile [WARNING] org.springframework:spring-beans:jar:5.3.22:compile [WARNING] org.zalando:problem-violations:jar:0.27.0:compile [WARNING] org.springframework:spring-tx:jar:5.3.22:compile [WARNING] org.assertj:assertj-core:jar:3.22.0:test [WARNING] org.springframework:spring-test:jar:5.3.22:test [WARNING] org.springframework:spring-webmvc:jar:5.3.22:compile [WARNING] ch.qos.logback:logback-classic:jar:1.2.11:compile [WARNING] org.springframework.security:spring-security-core:jar:5.7.3:compile [WARNING] com.fasterxml.jackson.core:jackson-core:jar:2.13.3:compile [WARNING] com.sun.mail:jakarta.mail:jar:1.6.7:compile [WARNING] org.springframework.security:spring-security-web:jar:5.7.3:compile [WARNING] org.springframework.data:spring-data-commons:jar:2.7.2:compile [WARNING] org.zalando:jackson-datatype-problem:jar:0.26.0:compile [WARNING] io.micrometer:micrometer-core:jar:1.9.3:compile [WARNING] org.springframework.boot:spring-boot-autoconfigure:jar:2.7.3:compile [WARNING] org.thymeleaf:thymeleaf:jar:3.0.15.RELEASE:compile [WARNING] com.fasterxml.jackson.core:jackson-databind:jar:2.13.3:compile [WARNING] org.springframework.data:spring-data-jpa:jar:2.7.2:compile [WARNING] org.aspectj:aspectjweaver:jar:1.9.7:compile [WARNING] org.hamcrest:hamcrest:jar:2.2:test [WARNING] jakarta.validation:jakarta.validation-api:jar:2.0.2:compile [WARNING] org.springframework:spring-context:jar:5.3.22:compile [WARNING] org.springframework:spring-context-support:jar:5.3.22:compile [WARNING] com.fasterxml.jackson.core:jackson-annotations:jar:2.13.3:compile [WARNING] org.springframework:spring-jdbc:jar:5.3.22:compile [WARNING] org.thymeleaf:thymeleaf-spring5:jar:3.0.15.RELEASE:compile [WARNING] javax.persistence:javax.persistence-api:jar:2.2:compile [WARNING] org.springframework.boot:spring-boot-test-autoconfigure:jar:2.7.3:test [WARNING] com.tngtech.archunit:archunit:jar:0.22.0:test [WARNING] Unused declared dependencies found: [WARNING] javax.annotation:javax.annotation-api:jar:1.3.2:compile [WARNING] org.springframework.boot:spring-boot-starter-cache:jar:2.7.3:compile [WARNING] com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.13.3:compile [WARNING] com.fasterxml.jackson.datatype:jackson-datatype-hppc:jar:2.13.3:compile [WARNING] org.springdoc:springdoc-openapi-webmvc-core:jar:1.6.11:compile [WARNING] com.zaxxer:HikariCP:jar:4.0.3:compile [WARNING] javax.cache:cache-api:jar:1.1.1:compile [WARNING] org.ehcache:ehcache:jar:3.10.0:compile [WARNING] org.hibernate:hibernate-jcache:jar:5.6.10.Final:compile [WARNING] org.hibernate:hibernate-jpamodelgen:jar:5.6.10.Final:provided [WARNING] org.hibernate:hibernate-core:jar:5.6.10.Final:compile [WARNING] org.hibernate.validator:hibernate-validator:jar:6.2.4.Final:compile [WARNING] org.mapstruct:mapstruct:jar:1.5.2.Final:compile [WARNING] org.mapstruct:mapstruct-processor:jar:1.5.2.Final:provided [WARNING] org.springframework.boot:spring-boot-configuration-processor:jar:2.7.3:provided [WARNING] org.springframework.boot:spring-boot-loader-tools:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-actuator:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-data-jpa:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-logging:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-mail:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-security:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-web:jar:2.7.3:compile [WARNING] org.springframework.boot:spring-boot-starter-test:jar:2.7.3:test [WARNING] com.tngtech.archunit:archunit-junit5-engine:jar:0.22.0:test [WARNING] org.springframework.boot:spring-boot-starter-undertow:jar:2.7.3:compile [WARNING] io.jsonwebtoken:jjwt-impl:jar:0.11.5:runtime [WARNING] io.jsonwebtoken:jjwt-jackson:jar:0.11.5:runtime [WARNING] org.springframework.security:spring-security-data:jar:5.7.3:compile [WARNING] io.micrometer:micrometer-registry-prometheus:jar:1.9.3:compile [WARNING] io.dropwizard.metrics:metrics-core:jar:4.2.11:compile [WARNING] org.springframework.boot:spring-boot-devtools:jar:2.7.3:compile [WARNING] com.h2database:h2:jar:2.1.214:compile

atomfrede commented 1 year ago

It is not as easy as you might think, especially for unused declared. For example all boot starters are "used" as we rely on the auto configuration they provide but don't use most likely nothing directly.

mraible commented 1 year ago

Closing because I don't think this is a problem.