quarkiverse / quarkus-web-bundler

Create full-stack web apps quickly and easily with this Quarkus extension. It offers zero-configuration bundling for your web app scripts (JS, JSX, TS, TSX), dependencies (jQuery, React, htmx, etc.), and styles (CSS, SCSS, SASS).
Apache License 2.0
18 stars 10 forks source link

Multi-module support #47

Closed chrisruffalo closed 1 year ago

chrisruffalo commented 1 year ago

See #46

I am trying to use quarkus-web-bundler in a multi-module project and get the following error:

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.2.0.Final:build (default-quarkus) on project koino-service-auth: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkiverse.web.bundler.deployment.staticresources.GeneratedStaticResourcesProcessor#processStaticFiles threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.workspace.WorkspaceModule.getBuildDir()" because the return value of "io.quarkus.maven.dependency.ResolvedDependency.getWorkspaceModule()" is null
[ERROR]         at io.quarkiverse.web.bundler.deployment.staticresources.GeneratedStaticResourcesProcessor.getBuildDirectory(GeneratedStaticResourcesProcessor.java:110)
[ERROR]         at io.quarkiverse.web.bundler.deployment.staticresources.GeneratedStaticResourcesProcessor.processStaticFiles(GeneratedStaticResourcesProcessor.java:38)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] -> [Help 1]

I know that the PR isn't the right thing to do but I don't know enough about what is produced during the Quarkus build to grab the right injection.

I'm going to make a minimal reproducer when I get a chance. Unfortunately the project I'm doing this on isn't public.

ia3andy commented 1 year ago

Thanks @chrisruffalo I will have a look :)

ia3andy commented 1 year ago

The 1.0.0 is released :)