Received status code 409 from server: Conflict error while migrating spring boot app to Gradle 7.3.3

I am moving my spring boot application from Gradle 5.3 to Gradle 7.3.3. I have mad the changes in the build.gradle accordingly as below:

It’s just a snippet

buildscript {
    ext {
        springBootVersion = '2.2.7.RELEASE'
        set('springCloudVersion', "Hoxton.SR6")
        log4jVersion = '2.17.0'
    }
    repositories {
        jcenter {
            url "https://jcenter.bintray.com/"
        }
        maven {
            url "https://artifactory.build.xxx.com"
            credentials {
                username = user
                password = pwd
            }
        }
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    
    dependencies {
        implementation(group: 'com.xxx.ym', name: 'external-service', version: '0.1.11', classifier: 'clientApi')
        implementation(group: 'com.xxx.ym', name: 'conformance-service', version: '1.0.2', classifier: 'clientApi')
        implementation(group: 'com.xxx.ym', name: 'security-service', version: '0.1.17', classifier: 'clientApi')
        implementation(group: 'com.xxx.ym', name: 'product-service', version: '1.2.0-9.0-development', classifier: 'clientApi')
        implementation(group: 'com.xxx.ym', name: 'service-client', version: '0.7.2')
        implementation(group: 'com.xxx.ym', name: 'reasons-service', version: '0.7.1')
        implementation('org.springframework.boot:spring-boot-starter-hateoas')
        implementation('org.springframework.boot:spring-boot-starter-security')
    }
}

When I try to do a clean build using gradlew clean build --refresh-dependencies I am always getting Could not GET ‘https://artifactory.build.ym.com/XXXX-SNAPSHOT/com/xxx/ym/external-service/0.1.11/external-service-0.1.11.pom’. Received status code 409 from server: Conflict error for dependencies which are present in our own artifactory. With Gradle 5.3 the build was succeeding without any errors.

I’ve started getting a similar error after moving from Gradle 4.10.2 to 5.4.1; the job built successfully previously and now fails when doing ./gradlew clean build
The issue has had NO response, what could the reason be? Is there no solution to this problem?

The issue has had NO response

Well, this is a community forum, not a support platform.
If no fellow uesr has anything to say, it can well be that threads go unanswered. :wink:

I’ve never heard of a 409 response on GET.
Do you really get the same as OP, or do you get it on trying to publish something?
Artifactory usually returns 409 if you try to publish something that is already present and is not allowed to be overwritten, of if you try to push something that is inconsistent in itself.
Maybe you can find from the Artifactory logs what the problem seems to be.