-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update with "quarkus" fails with gradle configured subprojects #45238
Comments
/cc @geoand (kotlin), @glefloch, @quarkusio/devtools, @radcortez (config) |
Yeah, unfortunately, supporting all combinations of Gradle config is hard and in this case, we are just using the recommendations from OpenRewrite as to how to apply updates to Gradle projects. If you are familiar with Gradle and can think of a way to make it work we can certainly adjust the Gradle script we generate and the executed command. |
Hi, I'm an active member over in the OpenRewrite community where we had a ticket created over there as a link back to this one. I've also got a wealth of knowledge when it comes to Gradle itself. I only have a superficial understanding of Quarkus, so I'm not quite sure where to look to see how/where the Gradle Groovy DSL initscript is defined within the project. But with the stacktrace alone, this kinda seems like the OpenRewrite plugin was missing when the dependency attempted to be added in the particular context since the One possibility is that the OpenRewrite plugin wants to be applied to the Gradle root project. If the project isn't the root, then the plugin skips its apply phase. |
@shanman190 Quarkus removes the init script from /tmp, difficult to trap but was able to save this(not sure if this is the correct initscript)
|
Ok, so that's an older script. I made an update to the docs back in August 2023. In the latest version of the initscript you'll find that the plugin is only applied to the rootProject and overall is a lot simpler than it used to be. In this case, one of the subprojects would have had their |
@gsmet @shanman190 Looks like an easy enough change? shanman thanks. |
Describe the bug
Execute:
quarkus update
Using gradle configuration described here: https://docs.gradle.org/current/userguide/declaring_dependencies_between_subprojects.html
Fails with:
Note: this also errors with previous versions.
Expected behavior
Update to new quarkus version
Actual behavior
See exception above.
How to Reproduce?
See: https://github.com/DaveO-Home/gradle-subprojects-quarkus
Create project like:
.
├── api
│ ├── src
│ │ └──...
│ └── build.gradle
├── services
│ └── person-service
│ ├── src
│ │ └──...
│ └── build.gradle
├── shared
│ ├── src
│ │ └──...
│ └── build.gradle
└── settings.gradle
execute
quarkus update
at top levelNote: When executing
quarkus
in a subproject it attempts to run correctly but fails during compile because it can't find the other subprojects.Output of
uname -a
orver
Linux mini-pc 6.12.5-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Dec 15 16:48:23 UTC 2024 x86_64 GNU/Linux
Output of
java -version
java 21.0.2 2024-01-16 LTS Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)
Quarkus version or git rev
3.17.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 8.8 ------------------------------------------------------------ Build time: 2024-05-31 21:46:56 UTC Revision: 4bd1b3d3fc3f31db5a26eecb416a165b8cc36082 Kotlin: 1.9.22 Groovy: 3.0.21 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.2 (Oracle Corporation 21.0.2+13-LTS-jvmci-23.1-b30) OS: Linux 6.12.5-200.fc41.x86_64 amd64
Additional information
No response
The text was updated successfully, but these errors were encountered: