-
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 |
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.