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

Application run failed: IllegalStateException - No Docker Compose file found #150

Open
MMANZANERO opened this issue Jul 8, 2024 · 2 comments

Comments

@MMANZANERO
Copy link

The application fails to run after updating to version 1.9.0 of the org.springdoc.openapi-gradle-plugin. The error indicates that no Docker Compose file is found in the specified directory.

Error Log

2024-07-02T09:58:32.472Z ERROR 2938 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalStateException: No Docker Compose file found in directory '/home/runner/work/app/build/tmp/forkedSpringBootRun/.'

Previous Configuration (version 1.8.0):

openApi {
    groupedApiMappings.set([
            "http://localhost:8080/v3/api-docs.yaml/event1" : "event1.yaml",
            "http://localhost:8080/v3/api-docs.yaml/event2"   : "event2.yaml",
    ])
    customBootRun {
        args = ["--spring.profiles.active=local"]
    }
}

Environment:

Plugin version: 1.9.0
Previous working version: 1.8.0
Java version: 21
Gradle version: 8.5

@EAlf91
Copy link

EAlf91 commented Jul 18, 2024

cause is this change #142

getting the behaviour from before can be achieved by setting the workingDir

for us this did the trick

 customBootRun {
        workingDir.set(project.rootProject.projectDir)
        args.set(["--spring.profiles.active=local"])
    }

for more context:
only happens due to some interaction with this dependency
developmentOnly "org.springframework.boot:spring-boot-docker-compose"

@anguzo
Copy link

anguzo commented Nov 15, 2024

This is most likely a problem with compose.yaml not being copied to the build/tmp directory which is now set for forkedSpringBootRun. This is solvable by pointing to the compose.yaml explicitly:

// Kotlin DSL
openApi {
    customBootRun {
        systemProperties = mapOf("spring.docker.compose.file" to "${projectDir}/compose.yaml")
    }
}

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

3 participants