Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build gradle project #10

Closed
PaulContremoulin opened this issue Mar 17, 2024 · 3 comments
Closed

Unable to build gradle project #10

PaulContremoulin opened this issue Mar 17, 2024 · 3 comments

Comments

@PaulContremoulin
Copy link

Hi,

Thanks for this project :)

I'm trying to install it but I'm running to the following issue when I add the dependency to my gradle projet:

Problems reading data from Binary store in [...path]\.gradle\.tmp\gradle18085399495289804999.bin offset 87035 exists? true
Problems loading the resolution results (0.001 secs). Read 451 values, last was: 5
Corrupt serialized resolution result. Cannot find selected component (4811) for runtime -> com.netflix.archaius:archaius-core:0.3.3

Corresponding file:

plugins {
	id 'org.springframework.boot' version '3.2.3'
	id 'io.spring.dependency-management' version '1.1.4'
}

java {
	sourceCompatibility = '17'
}

repositories {
	mavenCentral()
}

ext {
	set('springCloudVersion', "2023.0.0")
	set('openApiRouteDefLocatorVersion', "0.6.7-sc-2023.0")
}

dependencies {

	implementation 'org.springframework.boot:spring-boot-starter-actuator'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'

	/* Spring gateway */
	implementation 'org.springframework.cloud:spring-cloud-starter-gateway'

	/* Eureka client dependencies */
	implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
	implementation 'com.netflix.eureka:eureka-client-jersey3'

       /* Open API Documentaiton */
	implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.4.0'
	implementation 'net.bretti.openapi-route-definition-locator:openapi-route-definition-locator-spring-cloud-starter'

}

dependencyManagement {
	imports {
		mavenBom "net.bretti.openapi-route-definition-locator:openapi-route-definition-locator-bom:${openApiRouteDefLocatorVersion}"
		mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
	}
}

Have you any idea why this issue occurs ? :)

Thanks !

@jbretsch
Copy link
Owner

I was able to reproduce the problem but I'm not sure what causes it.

I found https://stackoverflow.com/a/70121332 and switched the order of the sections Eureka client dependencies and Open API Documentaiton in dependencies of the build.gradle file you provided. This made the error disappear.

@PaulContremoulin
Copy link
Author

It's weird, without the openapi-route-definition-locator in the same order, it's working fine. Maybe a dependency problem between packages.

I'm able to build my project by moving Eureka client dependencies at the end, thanks !

@jbretsch
Copy link
Owner

I've further simplified the build.gradle you provided and submitted it as a reproducer to the respective Gradle issue: gradle/gradle#14220 (comment). Thank you for reaching out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants