Skip to content

Servlet-api should only be used during compilation and is not needed during runtime as it is provided by container #13746

@codeconsole

Description

@codeconsole

This commit is forcing jakarta.servlet:jakarta.servlet-api to be resolved as an api dependency in several locations

Numerous dependencies should not be part of the final build:

configurations {
    all {
        exclude group: "jakarta.servlet", module: "jakarta.servlet-api"
        exclude group: "org.glassfish.jaxb", module: "jaxb-runtime"
        exclude group: "org.junit.jupiter", module: "junit-jupiter-api"
        exclude group: "org.apache.ant", module: "ant"
        exclude group: "org.springframework", module: "spring-test"
        exclude group: "org.hibernate", module: "hibernate-core" // dependency of eh-cache, not hibernate-core-jakarta
        exclude group: "jakarta.el", module: "jakarta.el-api"
        exclude group: "org.fusesource.jansi", module: "jansi"  // developmentOnly
        exclude group: "org.apache.groovy", module: "groovy-ant" // developmentOnly
    }
}

This should NOT be solved with exclusions. Dependencies should not be included in fhe first place.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions