Skip to content

Issue #120 fix - set fork working dir to temp dir #142

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

Merged
merged 1 commit into from
Jun 22, 2024
Merged

Issue #120 fix - set fork working dir to temp dir #142

merged 1 commit into from
Jun 22, 2024

Conversation

hesselapplications
Copy link
Contributor

Fixes #120

By default gradle-execfork-plugin sets the working dir to the project directory. This causes issues when running generateOpenApiDocs during a gradle build:

Reason: Task ':skeleton-server:forkedSpringBootRun' uses this output of task ':skeleton-server:bootJarMainClassName' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

Using a temporary directory instead of the project dir default resolves this

@@ -96,7 +96,7 @@ open class OpenApiGradlePlugin : Plugin<Project> {

// use original bootRun parameter if the list-type customBootRun properties are empty
workingDir = customBootRun.workingDir.asFile.orNull
?: fork.workingDir
?: fork.temporaryDir
Copy link
Contributor Author

@hesselapplications hesselapplications Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnasslahsen bnasslahsen merged commit d6f3d3e into springdoc:master Jun 22, 2024
fengelniederhammer added a commit to GenSpectrum/LAPIS that referenced this pull request Jul 2, 2024
The openapi gradle plugin changed the working dir from project root to a temp dir in build/:
springdoc/springdoc-openapi-gradle-plugin#142
fengelniederhammer added a commit to GenSpectrum/LAPIS that referenced this pull request Jul 2, 2024
The openapi gradle plugin changed the working dir from project root to a temp dir in build/:
springdoc/springdoc-openapi-gradle-plugin#142
dependabot bot pushed a commit to GenSpectrum/LAPIS that referenced this pull request Jul 2, 2024
The openapi gradle plugin changed the working dir from project root to a temp dir in build/:
springdoc/springdoc-openapi-gradle-plugin#142
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

Successfully merging this pull request may close these issues.

Build fails when running the api generation during a publish task.
2 participants