-
Notifications
You must be signed in to change notification settings - Fork 86
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
Gradle Plugin: Circular Dependency #1335
Labels
Milestone
Comments
@snazy, do you have any ideas on this one? My Gradle expertise isn't quite up to par :-) |
Looking... |
snazy
added a commit
to snazy/smallrye-open-api
that referenced
this issue
Jan 9, 2023
The Smallrye Gradle plugin adds the generated OpenAPI schema files (YAML + JSON) to the generated jar file. This was achieved using via the `processResources` task, which unfortunately is not "compatible" with the Quarkus plugin (see below output). The fix is to add the generated schema files directly to the `jar` task. Tests have been added to verify interopability with the Quarkus plugin, also reproducers for smallrye#1335 (without the production code changes of course): ``` Circular dependency between the following tasks: :compileJava +--- :quarkusGenerateCode | \--- :processResources | \--- :generateOpenApiSpec | +--- :compileJava (*) | +--- :quarkusGenerateCode (*) | \--- :quarkusGenerateCodeDev | \--- :processResources (*) \--- :quarkusGenerateCodeDev (*) ``` Fixes smallrye#1335
Fix in #1344 |
MikeEdgar
pushed a commit
that referenced
this issue
Jan 9, 2023
The Smallrye Gradle plugin adds the generated OpenAPI schema files (YAML + JSON) to the generated jar file. This was achieved using via the `processResources` task, which unfortunately is not "compatible" with the Quarkus plugin (see below output). The fix is to add the generated schema files directly to the `jar` task. Tests have been added to verify interopability with the Quarkus plugin, also reproducers for #1335 (without the production code changes of course): ``` Circular dependency between the following tasks: :compileJava +--- :quarkusGenerateCode | \--- :processResources | \--- :generateOpenApiSpec | +--- :compileJava (*) | +--- :quarkusGenerateCode (*) | \--- :quarkusGenerateCodeDev | \--- :processResources (*) \--- :quarkusGenerateCodeDev (*) ``` Fixes #1335
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to reproduce
./gradlew generateOpenApiSpec
. Gradle will give you the error:Solution
The problem is with those lines in SmallryeOpenApiPlugin.java:
When I remove those lines, the task runs as expected. I suppose those lines have their purpose and although removing them works for my use case, it might break other use cases.
The text was updated successfully, but these errors were encountered: