-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix gradle devui NoClassDefFound #46680
Fix gradle devui NoClassDefFound #46680
Conversation
@@ -465,11 +464,14 @@ private DevModeCommandLine newLauncher(final AnalyticsService analyticsService) | |||
builder.extensionDevModeConfig(appModel.getExtensionDevModeConfig()) | |||
.extensionDevModeJvmOptionFilter(extensionJvmOptions); | |||
|
|||
builder.jvmArgs("-Dgradle.project.path=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way I found to findthe correct gradle project path independent of build language or sourceSet name is to send it as a system property
analyticsService.sendAnalytics( | ||
DEV_MODE, | ||
appModel, | ||
Map.of(GRADLE_VERSION, getProject().getGradle().getGradleVersion()), | ||
getProject().getBuildDir().getAbsoluteFile()); | ||
getProject().getLayout().getBuildDirectory().getAsFile().get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getBuildDir()
is deprecated
@@ -150,7 +150,9 @@ export class QwcContinuousTesting extends QwcHotReloadElement { | |||
|
|||
_cancelObservers(){ | |||
this._streamStateObserver.cancel(); | |||
this._streamResultsObserver.cancel(); | |||
if(this._streamResultsObserver){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was undefined when switching tabs without running tests
extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js
Outdated
Show resolved
Hide resolved
@Malandril thanks a lot for looking into this. Perhaps try
to add the Maven resolver classes for the extension catalog resolver. |
…and add with gradle
305e64d
to
45c9998
Compare
Thanks @aloubyansky its a lot simpler |
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Malandril thanks a lot!
@phillip-kruger the change look good to me. Are you ok with it as well?
Yes |
…us-googlecloud-jsonlogging!27) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io.quarkus:quarkus-extension-processor](https://github.com/quarkusio/quarkus) | | patch | `3.19.2` -> `3.19.3` | | [io.quarkus:quarkus-extension-maven-plugin](https://github.com/quarkusio/quarkus) | build | patch | `3.19.2` -> `3.19.3` | | [io.quarkus:quarkus-bom](https://github.com/quarkusio/quarkus) | import | patch | `3.19.2` -> `3.19.3` | | [io.quarkus:quarkus-maven-plugin](https://github.com/quarkusio/quarkus) | build | patch | `3.19.2` -> `3.19.3` | --- ### Release Notes <details> <summary>quarkusio/quarkus</summary> ### [`v3.19.3`](https://github.com/quarkusio/quarkus/releases/tag/3.19.3) [Compare Source](quarkusio/quarkus@3.19.2...3.19.3) ##### Complete changelog - [#​45112](quarkusio/quarkus#45112) - Exception about missing maven classes when opening the dev-ui (gradle based project) - [#​46430](quarkusio/quarkus#46430) - ResponseBuilderImpl NumberFormatException with IPv6 - [#​46459](quarkusio/quarkus#46459) - Upgrading from 3.18.2 to 3.18.3 Results in OutOfMemoryError when using `@QuarkusTest` with Quarkus Junit 5 - [#​46527](quarkusio/quarkus#46527) - Broken archive in vaadin-webcomponent dependency - [#​46566](quarkusio/quarkus#46566) - Issuer-based OIDC tenant resolver should check `quarkus.oidc.token.required-claims` - [#​46615](quarkusio/quarkus#46615) - OIDC client token requests retry not working - [#​46621](quarkusio/quarkus#46621) - Bump testcontainers.version from 1.20.5 to 1.20.6 - [#​46624](quarkusio/quarkus#46624) - Devui Database View can not find tables in different schemas - [#​46632](quarkusio/quarkus#46632) - Make ResponseBuilderImpl more ipv6 aware - [#​46634](quarkusio/quarkus#46634) - Check required claims in OIDC issuer-based resolver - [#​46635](quarkusio/quarkus#46635) - Update some dev-ui libs versions - [#​46638](quarkusio/quarkus#46638) - Bump Keycloak version to 26.1.3 - [#​46640](quarkusio/quarkus#46640) - Using SocketException in all of the OIDC retry code - [#​46651](quarkusio/quarkus#46651) - Fix non-public schema in DB Viewer for Dev UI - [#​46653](quarkusio/quarkus#46653) - Add -e to quarkus update commands and improve display - [#​46655](quarkusio/quarkus#46655) - JSON-B link - [#​46659](quarkusio/quarkus#46659) - Correct link to JSON-B API - [#​46660](quarkusio/quarkus#46660) - Correct summary text of config-yaml.adoc - [#​46661](quarkusio/quarkus#46661) - Correct summary text of spring-boot-properties.adoc - [#​46664](quarkusio/quarkus#46664) - ArC: fix disposer resolution in case the disposed parameter declares no qualifiers - [#​46680](quarkusio/quarkus#46680) - Fix gradle devui NoClassDefFound - [#​46684](quarkusio/quarkus#46684) - Revert "Execute simple JUnit tests and `@QuarkusComponentTest` first" - [#​46685](quarkusio/quarkus#46685) - Micrometer docs moved - fix links - [#​46695](quarkusio/quarkus#46695) - Introduce `server.port` tag into `http.server.active.requests` metric - [#​46700](quarkusio/quarkus#46700) - Exclude `.github/project.yml` from triggering workflows on push event - [#​46706](quarkusio/quarkus#46706) - Fix wording in quarkus-rest jsonview support - [#​46709](quarkusio/quarkus#46709) - Fix true-false typo - [#​46712](quarkusio/quarkus#46712) - Bump resteasy.version from 6.2.11.Final to 6.2.12.Final - [#​46713](quarkusio/quarkus#46713) - Bump hibernate-orm.version from 6.6.9.Final to 6.6.10.Final - [#​46714](quarkusio/quarkus#46714) - Bump io.micrometer:micrometer-bom from 1.14.4 to 1.14.5 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4yNC4wIiwidXBkYXRlZEluVmVyIjoiMzQuMjQuMCJ9-->
This PR fixes #45112.
It fixes the devui NoClassDefFound errors triggered when using the gradle build tool in dev mode and disables the Add extension button.
When #43840 was merged it allowed to dynamically add new extensions using the dev ui but it doesn't work nicelly with gradle projects:
quarkus/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/menu/ExtensionsProcessor.java
Line 201 in 43c95ab
build/classes/java/main
directory and not the project directory and as such will always detect a gradle project as being a maven projectquarkus/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java
Line 498 in 43c95ab
io.quarkus.devtools.project.buildfile.GenericGradleBuildFile
extensionManager cannot neither list nor add any new extension as it doesn't work outside of the gradle plugin.