最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

build.gradle - Test Class failure with Spring 3.4.2 version - Stack Overflow

programmeradmin0浏览0评论

Upgraded my spring boot version to id 'org.springframework.boot' version '3.4.2'

and test cases are failing. with below error.

I upgraded all the dependencies version. Not sure what I am missing.

Changed the test @Mockbean to @MockitoBean as MockBean is deprecated in 3.4.X versions

java.lang.NoSuchMethodError: 'java.util.LinkedHashSet org.springframework.util.CollectionUtils.newLinkedHashSet(int)' at org.springframework.test.context.TestContextManager.(TestContextManager.java:95) at org.springframework.test.context.junit.jupiter.SpringExtension.getTestContextManager(SpringExtension.java:363) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:158) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at java.base/java.util.Optional.orElseGet(Optional.java:364) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

build.gadle

plugins {
    id 'org.springframework.boot' version '3.4.2'
    id 'io.spring.dependency-management' version '1.1.6'
    id 'java'
    id 'jacoco'
    id 'org.sonarqube' version '5.1.0.4882'
    id 'maven-publish'
    id 'com.gorylenko.gradle-git-properties' version '2.4.2'
    id 'io.freefair.lombok' version '8.10'
}

group = 'com.edwardjones'
version = 'VERSION_NUMBER'

java {
    sourceCompatibility = JavaVersion.VERSION_17
}

repositories {
    maven {
        url ':8181/artifactory/repo'
        allowInsecureProtocol = true
    }
    //temporarily added to resolve dependency resolution issue for jboss-logging 3.5.1.Final
    maven {
        url ':8181/artifactory/libs-release/'
        allowInsecureProtocol = true
    }
}

configurations.all {
    exclude group: "org.bouncycastle", module: "bcpkix-jdk15on"
    exclude group: 'ch.qos.reload4j'
}

ext['spring-security-config.version']= '6.3.4'
ext['hazelcastVersion']= '5.3.6'

dependencies {
    //Crm-cluster-starter - Retry, DLT & Circuit Breaker for pause/Resume
    implementation 'com.edwardjones.crm:crm-kafka-cluster-starter:1.1.1'
    implementation 'org.springframework.boot:spring-boot-starter'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.security:spring-security-config'
    implementation 'org.springframework:spring-aspects'


    //EJ framework
    implementation 'com.edwardjones.framework:frm-slf4j'
    implementation 'com.edwardjones.framework:frm-stats'
    implementation 'com.edwardjones.framework:frm-spring-boot-starter-rest-server'
    implementation 'com.edwardjones.framework:frm-spring-boot-starter-security'
    implementation 'com.edwardjones.security:wam-auth-password'
    implementation 'com.edwardjones.framework:frm-spring-rest-client'

    implementation 'org.springframework:spring-webmvc:7.0.0-M1'
    implementation "org.springframework:spring-webflux:7.0.0-M1"          //Fix CVE-2024-38816
    // CVE-2024-38810
    implementation 'org.springframework.security:spring-security-core:6.4.2'

    // bsd logging
    implementation 'com.edwardjones.bsd:bsd-error-logging:2.0.0'

    // Swagger OpenAPI
    implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'

    // HTTP Components
    implementation 'org.apache.httpcomponents.core5:httpcore5:5.3.3'
    implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'


    // Hashicorp Vault
    implementation 'org.springframework.cloud:spring-cloud-starter-vault-config:4.2.0'
    implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'

    // Needed to patch snakeyaml:1.3.3 vulnerability in dependencies
    implementation 'org.yaml:snakeyaml:2.3'
    // Needed to patch json-smart vulnerability
    implementation 'com.jayway.jsonpath:json-path:2.9.0'
    implementation 'com.nimbusds:oauth2-oidc-sdk:11.21.3'
    implementation 'ioty:netty-handler:5.0.0.Alpha2'
    implementation 'ioty:netty-codec:5.0.0.Alpha2'
    implementation 'ioty:netty-codec-http2:5.0.0.Alpha2'
    implementation 'org.xerial.snappy:snappy-java:1.1.10.5'
    implementation 'io.projectreactorty:reactor-netty-http:1.1.13'

    /** timestamp interceptor **/
    implementation ('io.confluent:timestamp-interceptor:7.6.1'){
        exclude group: 'io.swagger.core.v3'
        exclude group: 'org.eclipse.jetty'
        exclude group: 'com.google.protobuf' , module:'protobuf-java'
        exclude group: 'ioty', module:'netty-common'
    }

    //resilience4j
    implementation 'org.springframework.boot:spring-boot-starter-aop'
    implementation 'io.github.resilience4j:resilience4j-spring-boot3'
    implementation 'io.github.resilience4j:resilience4j-annotations'
    implementation 'io.github.resilience4j:resilience4j-all'
    implementation 'org.springframework.cloud:spring-cloud-stream'
    implementation 'org.springframework.cloud:spring-cloud-function-context'
    implementation 'org.springframework.cloud:spring-cloud-stream-binder-kafka'

    // Hazelcast
    implementation "org.springframework.session:spring-session-hazelcast"
    implementation "com.hazelcast:hazelcast:${hazelcastVersion}"
    implementation "com.hazelcast:hazelcast-spring:${hazelcastVersion}"
    testImplementation "com.hazelcast:hazelcast:${hazelcastVersion}:tests"

    //CVE-2024-7254
    implementation 'com.google.protobuf:protobuf-java:4.27.5'
    //CVE-2021-47621
    implementation 'io.github.classgraph:classgraph:4.8.112'

    //CVE-2024-47561
//  implementation 'org.apache.avro:avro:1.11.4'

    //CVE-2024-38821
    implementation 'org.springframework.security:spring-security-web:6.3.4'

    //CVE-2024-47535
    implementation 'ioty:netty-common:4.1.115.Final'

    // CVE-2024-52317
    implementation 'org.apache.tomcat.embed:tomcat-embed-core:11.0.2'

    //CVE-2024-38820
    implementation 'org.springframework:spring-context:6.1.14'
    implementation 'org.springframework:spring-web:6.1.14'
    implementation 'org.springframework:spring-core:6.1.14'

    //CVE-2024-38827
    implementation 'org.springframework:spring-expression:6.1.14'
    implementation 'org.springframework:spring-beans:6.1.14'



    runtimeOnly 'org.springframework.boot:spring-boot-devtools:3.4.2'
    compileOnly "jakarta.servlet:jakarta.servlet-api:6.1.0"
    testCompileOnly "jakarta.servlet:jakarta.servlet-api:6.1.0"

    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
    testImplementation 'org.springframework.boot:spring-boot-starter-test:3.4.2',
            'org.springframework.security:spring-security-test:6.4.2',
            'org.springframework.kafka:spring-kafka-test:3.3.2',
            'org.awaitility:awaitility:4.2.2'

}

dependencyManagement {
    imports {
        mavenBom 'com.edwardjones.framework:frm-framework-dependencies:4.3.0'
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.3"
    }
}

springBoot {
    buildInfo()
}

jar {
    enabled = false
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact bootJar
        }
    }
}

jacocoTestReport {
    dependsOn test // tests are required to run before generating the report
    reports {
        xml.required = true
    }
}

test {
    useJUnitPlatform()
    finalizedBy jacocoTestReport
}

sonarqube {
    properties {
        property "sonar.exclusions", "**/com/edwardjones/cap/fundtrades/producer/config/OpenApiConfig.java"
//            use this property for to run sonar on local
//            property "sonar.host.url", :9010
    }

}

Upgraded my spring boot version to id 'org.springframework.boot' version '3.4.2'

and test cases are failing. with below error.

I upgraded all the dependencies version. Not sure what I am missing.

Changed the test @Mockbean to @MockitoBean as MockBean is deprecated in 3.4.X versions

java.lang.NoSuchMethodError: 'java.util.LinkedHashSet org.springframework.util.CollectionUtils.newLinkedHashSet(int)' at org.springframework.test.context.TestContextManager.(TestContextManager.java:95) at org.springframework.test.context.junit.jupiter.SpringExtension.getTestContextManager(SpringExtension.java:363) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:158) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at java.base/java.util.Optional.orElseGet(Optional.java:364) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

build.gadle

plugins {
    id 'org.springframework.boot' version '3.4.2'
    id 'io.spring.dependency-management' version '1.1.6'
    id 'java'
    id 'jacoco'
    id 'org.sonarqube' version '5.1.0.4882'
    id 'maven-publish'
    id 'com.gorylenko.gradle-git-properties' version '2.4.2'
    id 'io.freefair.lombok' version '8.10'
}

group = 'com.edwardjones'
version = 'VERSION_NUMBER'

java {
    sourceCompatibility = JavaVersion.VERSION_17
}

repositories {
    maven {
        url 'http://maven.edj.devjones.com:8181/artifactory/repo'
        allowInsecureProtocol = true
    }
    //temporarily added to resolve dependency resolution issue for jboss-logging 3.5.1.Final
    maven {
        url 'http://repository.edwardjones.com:8181/artifactory/libs-release/'
        allowInsecureProtocol = true
    }
}

configurations.all {
    exclude group: "org.bouncycastle", module: "bcpkix-jdk15on"
    exclude group: 'ch.qos.reload4j'
}

ext['spring-security-config.version']= '6.3.4'
ext['hazelcastVersion']= '5.3.6'

dependencies {
    //Crm-cluster-starter - Retry, DLT & Circuit Breaker for pause/Resume
    implementation 'com.edwardjones.crm:crm-kafka-cluster-starter:1.1.1'
    implementation 'org.springframework.boot:spring-boot-starter'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.security:spring-security-config'
    implementation 'org.springframework:spring-aspects'


    //EJ framework
    implementation 'com.edwardjones.framework:frm-slf4j'
    implementation 'com.edwardjones.framework:frm-stats'
    implementation 'com.edwardjones.framework:frm-spring-boot-starter-rest-server'
    implementation 'com.edwardjones.framework:frm-spring-boot-starter-security'
    implementation 'com.edwardjones.security:wam-auth-password'
    implementation 'com.edwardjones.framework:frm-spring-rest-client'

    implementation 'org.springframework:spring-webmvc:7.0.0-M1'
    implementation "org.springframework:spring-webflux:7.0.0-M1"          //Fix CVE-2024-38816
    // CVE-2024-38810
    implementation 'org.springframework.security:spring-security-core:6.4.2'

    // bsd logging
    implementation 'com.edwardjones.bsd:bsd-error-logging:2.0.0'

    // Swagger OpenAPI
    implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'

    // HTTP Components
    implementation 'org.apache.httpcomponents.core5:httpcore5:5.3.3'
    implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'


    // Hashicorp Vault
    implementation 'org.springframework.cloud:spring-cloud-starter-vault-config:4.2.0'
    implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'

    // Needed to patch snakeyaml:1.3.3 vulnerability in dependencies
    implementation 'org.yaml:snakeyaml:2.3'
    // Needed to patch json-smart vulnerability
    implementation 'com.jayway.jsonpath:json-path:2.9.0'
    implementation 'com.nimbusds:oauth2-oidc-sdk:11.21.3'
    implementation 'io.netty:netty-handler:5.0.0.Alpha2'
    implementation 'io.netty:netty-codec:5.0.0.Alpha2'
    implementation 'io.netty:netty-codec-http2:5.0.0.Alpha2'
    implementation 'org.xerial.snappy:snappy-java:1.1.10.5'
    implementation 'io.projectreactor.netty:reactor-netty-http:1.1.13'

    /** timestamp interceptor **/
    implementation ('io.confluent:timestamp-interceptor:7.6.1'){
        exclude group: 'io.swagger.core.v3'
        exclude group: 'org.eclipse.jetty'
        exclude group: 'com.google.protobuf' , module:'protobuf-java'
        exclude group: 'io.netty', module:'netty-common'
    }

    //resilience4j
    implementation 'org.springframework.boot:spring-boot-starter-aop'
    implementation 'io.github.resilience4j:resilience4j-spring-boot3'
    implementation 'io.github.resilience4j:resilience4j-annotations'
    implementation 'io.github.resilience4j:resilience4j-all'
    implementation 'org.springframework.cloud:spring-cloud-stream'
    implementation 'org.springframework.cloud:spring-cloud-function-context'
    implementation 'org.springframework.cloud:spring-cloud-stream-binder-kafka'

    // Hazelcast
    implementation "org.springframework.session:spring-session-hazelcast"
    implementation "com.hazelcast:hazelcast:${hazelcastVersion}"
    implementation "com.hazelcast:hazelcast-spring:${hazelcastVersion}"
    testImplementation "com.hazelcast:hazelcast:${hazelcastVersion}:tests"

    //CVE-2024-7254
    implementation 'com.google.protobuf:protobuf-java:4.27.5'
    //CVE-2021-47621
    implementation 'io.github.classgraph:classgraph:4.8.112'

    //CVE-2024-47561
//  implementation 'org.apache.avro:avro:1.11.4'

    //CVE-2024-38821
    implementation 'org.springframework.security:spring-security-web:6.3.4'

    //CVE-2024-47535
    implementation 'io.netty:netty-common:4.1.115.Final'

    // CVE-2024-52317
    implementation 'org.apache.tomcat.embed:tomcat-embed-core:11.0.2'

    //CVE-2024-38820
    implementation 'org.springframework:spring-context:6.1.14'
    implementation 'org.springframework:spring-web:6.1.14'
    implementation 'org.springframework:spring-core:6.1.14'

    //CVE-2024-38827
    implementation 'org.springframework:spring-expression:6.1.14'
    implementation 'org.springframework:spring-beans:6.1.14'



    runtimeOnly 'org.springframework.boot:spring-boot-devtools:3.4.2'
    compileOnly "jakarta.servlet:jakarta.servlet-api:6.1.0"
    testCompileOnly "jakarta.servlet:jakarta.servlet-api:6.1.0"

    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
    testImplementation 'org.springframework.boot:spring-boot-starter-test:3.4.2',
            'org.springframework.security:spring-security-test:6.4.2',
            'org.springframework.kafka:spring-kafka-test:3.3.2',
            'org.awaitility:awaitility:4.2.2'

}

dependencyManagement {
    imports {
        mavenBom 'com.edwardjones.framework:frm-framework-dependencies:4.3.0'
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.3"
    }
}

springBoot {
    buildInfo()
}

jar {
    enabled = false
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact bootJar
        }
    }
}

jacocoTestReport {
    dependsOn test // tests are required to run before generating the report
    reports {
        xml.required = true
    }
}

test {
    useJUnitPlatform()
    finalizedBy jacocoTestReport
}

sonarqube {
    properties {
        property "sonar.exclusions", "**/com/edwardjones/cap/fundtrades/producer/config/OpenApiConfig.java"
//            use this property for to run sonar on local
//            property "sonar.host.url", http://nldasonar-2.edj.devjones.com:9010
    }

}

Share Improve this question asked Feb 6 at 10:38 NandiniNandini 337 bronze badges 1
  • Remove spring-webmvc and spring-webflux those are incompatible nor should you manage those separatly . Use spring-boot-starter-security and ditch spring-security-web. Remove all org.springframework dependencies those interfere with the Spring BOot managed ones. Remove versions from spring-security-test and spring-kafka-test. Remove servlet-api dependencies. Remove version from spring-boot-starter-test ditch junit-jupiter-engine. There are probably even more as you are trying to outsmart the dependency already done by Spring boot and spring-boot-starter-* dependencies. – M. Deinum Commented Feb 6 at 10:48
Add a comment  | 

1 Answer 1

Reset to default 1

In short the problem is your dependencies as they are a mess of incompatible versions. You are trying to outsmart the Spring Boot managed dependencies and the dependencies you are pulling in through the various spring-boot-starter-* dependencies.

plugins {
    id 'org.springframework.boot' version '3.4.2'
    id 'io.spring.dependency-management' version '1.1.7'
    id 'java'
    id 'jacoco'
    id 'org.sonarqube' version '5.1.0.4882'
    id 'maven-publish'
    id 'com.gorylenko.gradle-git-properties' version '2.4.2'
    id 'io.freefair.lombok' version '8.10'
}

group = 'com.edwardjones'
version = 'VERSION_NUMBER'

java {
    sourceCompatibility = JavaVersion.VERSION_17
}

repositories {
    maven {
        url 'http://maven.edj.devjones.com:8181/artifactory/repo'
        allowInsecureProtocol = true
    }
    //temporarily added to resolve dependency resolution issue for jboss-logging 3.5.1.Final
    maven {
        url 'http://repository.edwardjones.com:8181/artifactory/libs-release/'
        allowInsecureProtocol = true
    }
}

configurations.all {
    exclude group: "org.bouncycastle", module: "bcpkix-jdk15on"
    exclude group: 'ch.qos.reload4j'
}

ext['hazelcastVersion']= '5.3.6'

dependencies {
    //Crm-cluster-starter - Retry, DLT & Circuit Breaker for pause/Resume
    implementation 'com.edwardjones.crm:crm-kafka-cluster-starter:1.1.1'
    implementation 'org.springframework.boot:spring-boot-starter'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-aop'

    //EJ framework
    implementation 'com.edwardjones.framework:frm-slf4j'
    implementation 'com.edwardjones.framework:frm-stats'
    implementation 'com.edwardjones.framework:frm-spring-boot-starter-rest-server'
    implementation 'com.edwardjones.framework:frm-spring-boot-starter-security'
    implementation 'com.edwardjones.security:wam-auth-password'
    implementation 'com.edwardjones.framework:frm-spring-rest-client'


    // bsd logging
    implementation 'com.edwardjones.bsd:bsd-error-logging:2.0.0'

    // Swagger OpenAPI
    implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.4'

    // HTTP Components
    implementation 'org.apache.httpcomponents.core5:httpcore5:5.3.3'
    implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'


    // Hashicorp Vault
    implementation 'org.springframework.cloud:spring-cloud-starter-vault-config'
    implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.2'

    // Needed to patch json-smart vulnerability
    implementation 'com.jayway.jsonpath:json-path'
    implementation 'com.nimbusds:oauth2-oidc-sdk:11.21.3'
    implementation 'io.netty:netty-handler:5.0.0.Alpha2'
    implementation 'io.netty:netty-codec:5.0.0.Alpha2'
    implementation 'io.netty:netty-codec-http2:5.0.0.Alpha2'
    implementation 'org.xerial.snappy:snappy-java:1.1.10.5'
    implementation 'io.projectreactor.netty:reactor-netty-http:1.1.13'

    /** timestamp interceptor **/
    implementation ('io.confluent:timestamp-interceptor:7.6.1'){
        exclude group: 'io.swagger.core.v3'
        exclude group: 'org.eclipse.jetty'
        exclude group: 'com.google.protobuf' , module:'protobuf-java'
        exclude group: 'io.netty', module:'netty-common'
    }

    //resilience4j
    implementation 'io.github.resilience4j:resilience4j-spring-boot3'
    implementation 'io.github.resilience4j:resilience4j-annotations'
    implementation 'io.github.resilience4j:resilience4j-all'
    implementation 'org.springframework.cloud:spring-cloud-stream'
    implementation 'org.springframework.cloud:spring-cloud-function-context'
    implementation 'org.springframework.cloud:spring-cloud-stream-binder-kafka'

    // Hazelcast
    implementation "org.springframework.session:spring-session-hazelcast"
    implementation "com.hazelcast:hazelcast:${hazelcastVersion}"
    implementation "com.hazelcast:hazelcast-spring:${hazelcastVersion}"
    testImplementation "com.hazelcast:hazelcast:${hazelcastVersion}:tests"

    //CVE-2024-7254
    implementation 'com.google.protobuf:protobuf-java:4.27.5'
    //CVE-2021-47621
    implementation 'io.github.classgraph:classgraph:4.8.112'

    //CVE-2024-47561
//  implementation 'org.apache.avro:avro:1.11.4'

    //CVE-2024-47535
    implementation 'io.netty:netty-common:4.1.115.Final'

    runtimeOnly 'org.springframework.boot:spring-boot-devtools'

    testImplementation 'org.springframework.boot:spring-boot-starter-test',
            'org.springframework.security:spring-security-test',
            'org.springframework.kafka:spring-kafka-test',
            'org.awaitility:awaitility'
}

dependencyManagement {
    imports {
        mavenBom 'com.edwardjones.framework:frm-framework-dependencies:4.3.0'
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:2024.0.0"
    }
}

springBoot {
    buildInfo()
}

jar {
    enabled = false
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact bootJar
        }
    }
}

jacocoTestReport {
    dependsOn test // tests are required to run before generating the report
    reports {
        xml.required = true
    }
}

test {
    useJUnitPlatform()
    finalizedBy jacocoTestReport
}

sonarqube {
    properties {
        property "sonar.exclusions", "**/com/edwardjones/cap/fundtrades/producer/config/OpenApiConfig.java"
//            use this property for to run sonar on local
//            property "sonar.host.url", http://nldasonar-2.edj.devjones.com:9010
    }
}

Here is a cleaned up version in a first attempt to fix things.

  • Removed all org.springframework.security individual dependencies and replaced with spring-boot-starter-security. The individual ones were a mix of incompatible and incomplete versions.
  • Removed all org.springframework dependencies as 6.1 is not the version used by Spring BOot 3.4 and the Spring 7.x versions aren't even compatible with 6.1 or 6.2. Never mix jars from different versions of a framework
  • Removed versions for dependencies already managed in the same or newer versions by Spring Boot
  • Compatible version of springdoc-openapi-starter-webmvc-ui
  • Compatible version of spring-cloud-dependencies and removed versions from org.springframework.cloud dependencies to prevent version conflicts.
  • Removed tomcat dependency that is managed by Spring Boot and leads to mixing version 10 and 11 jars. Decide on what you want and manage properly

You probably want to re-think your Netty dependencies as well as that is a mixture of versions as well, especially Alpha versions which you shouldn't really use.

发布评论

评论列表(0)

  1. 暂无评论