Skip to content
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

Package: Production Build Failing on Windows 11 #516

Closed
melloware opened this issue Sep 22, 2023 · 3 comments · Fixed by #525
Closed

Package: Production Build Failing on Windows 11 #516

melloware opened this issue Sep 22, 2023 · 3 comments · Fixed by #525
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@melloware
Copy link
Contributor

Describe the bug

When running mvn clean package with 2.2.0.CR1 on Windows 11 I am getting an Access Denied.

Looks like itis on this line:

io.quarkiverse.quinoa.deployment.QuinoaProcessor.processBuild(QuinoaProcessor.java:178)

Log:

[INFO] --- quarkus:3.4.1:build (default) @ domino-flow ---
[INFO] [io.quarkiverse.quinoa.deployment.framework.FrameworkType] Quinoa detected 'VITE' framework from package.json file.
[INFO] Node v18.17.0 is already installed.
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] Running Quinoa package manager build command: node.exe C:\dev\melloware\.quinoa\node\node_modules\npm\bin\npm-cli.js run build
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner]
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] > domino-flow@1.0.0 build
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] > tsc && npm run prepare-assets && vite build
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner]
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner]
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] > domino-flow@1.0.0 prepare-assets
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] > copyfiles -f "./node_modules/pdfjs-dist/build/pdf.worker.min.js" ./public/assets/js
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner]
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] vite v4.4.9 building for production...
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] transforming...
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] node_modules/pdfjs-dist/build/pdf.js (2012:23) Use of eval in "node_modules/pdfjs-dist/build/pdf.js" is strongly discouraged as it poses security risks and may cause issues with minification.
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] â?? 1003 modules transformed.
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] rendering chunks...
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] computing gzip size...
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-v4compatibility-335fd7d9.woff2      4.57 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/index.html
         5.98 kB â?? gzip:   4.53 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-v4compatibility-455e8e72.ttf       10.17 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/color-473bc8ca.png
        10.36 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-regular-400-9169d8be.woff2
        24.49 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-regular-400-7d81a1a7.ttf
        63.35 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-brands-400-faae6fc0.woff2
       109.81 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-solid-900-886c8611.woff2
       150.02 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-brands-400-003f1154.ttf
       189.68 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/fa-solid-900-cea79b34.ttf
       394.67 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/index-ff6b5571.css
       765.23 kB â?? gzip: 100.04 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/auto-596285f5.js
         1.22 kB â?? gzip:   0.59 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] dist/assets/index-aee92533.js
     3,385.76 kB â?? gzip: 781.95 kB
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner]
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] (!) Some chunks are larger than 500 kBs after minification. Consider:
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] - Using dynamic import() to code-split the application
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
[INFO] [io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner] â?? built in 9.73s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  30.117 s
[INFO] Finished at: 2023-09-22T15:31:05-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.4.1:build (default) on project domino-flow: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkiverse.quinoa.deployment.QuinoaProcessor#processBuild threw an exception: java.lang.IllegalStateException: java.nio.file.AccessDeniedException: C:\dev\melloware\src\main\webui\dist -> C:\melloware\target\quinoa-build
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:867)
[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] Caused by: java.nio.file.AccessDeniedException: C:\dev\melloware\src\main\webui\dist -> C:\dev\melloware\target\quinoa-build
[ERROR]         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
[ERROR]         at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
[ERROR]         at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:403)
[ERROR]         at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
[ERROR]         at java.base/java.nio.file.Files.move(Files.java:1432)
[ERROR]         at io.quarkiverse.quinoa.deployment.QuinoaProcessor.processBuild(QuinoaProcessor.java:178)
[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:858)
[ERROR]         ... 6 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To se
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Quinoa version

2.2.0.CR1

Quarkus version

3.4.1

Build / Runtime

Vite

Package Manager

NPM

Steps to reproduce the behavior

When I run I can't copy.

Expected behavior

Production Build

@melloware melloware self-assigned this Sep 22, 2023
@melloware melloware changed the title Package: Production Build Failing Package: Production Build Failing on Windows 11 Sep 22, 2023
@melloware melloware added the bug Something isn't working label Sep 22, 2023
@melloware melloware added this to the 2.2.0 milestone Sep 22, 2023
melloware added a commit to melloware/quarkus-quinoa that referenced this issue Sep 22, 2023
@ia3andy
Copy link
Collaborator

ia3andy commented Sep 25, 2023

Could you check that it's not because it's open in explorer?
https://stackoverflow.com/questions/22988210/java-nio-file-accessdeniedexception-while-using-files-move

@melloware melloware added needs triage Issue needs triaging and removed bug Something isn't working labels Sep 25, 2023
@melloware melloware removed this from the 2.2.0 milestone Sep 25, 2023
melloware added a commit to melloware/quarkus-quinoa that referenced this issue Sep 25, 2023
@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
@ia3andy
Copy link
Collaborator

ia3andy commented Sep 27, 2023

@melloware when move fails we could have a message saying that it's probably due to something using the build directory (file explorer, ...).

@melloware
Copy link
Contributor Author

Good idea let me reopen this and add a better message.

@melloware melloware reopened this Sep 27, 2023
@melloware melloware added enhancement New feature or request and removed needs triage Issue needs triaging labels Sep 27, 2023
@melloware melloware added this to the 2.2.0 milestone Sep 27, 2023
melloware added a commit to melloware/quarkus-quinoa that referenced this issue Sep 27, 2023
melloware added a commit to melloware/quarkus-quinoa that referenced this issue Sep 27, 2023
melloware added a commit that referenced this issue Sep 28, 2023
* Fix #516: Better error message if failed moving files

* Update deployment/src/main/java/io/quarkiverse/quinoa/deployment/QuinoaProcessor.java

Co-authored-by: Andy Damevin <ia3andy@gmail.com>

---------

Co-authored-by: Andy Damevin <ia3andy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants