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

[ENHANCEMENT] mvnd failed while I purposely disabled ~/.m2 directory #278

Closed
yiding-he opened this issue Dec 21, 2020 · 2 comments
Closed
Labels
wontfix This will not be worked on

Comments

@yiding-he
Copy link

I purposely disabled read/write access to ~/.m2 directory and set <localRepository> to other location to prevent any downloading of jars to my home directory. Maven works fine but mvnd fails:

Exception in thread "main" org.mvndaemon.mvnd.common.DaemonException: java.nio.file.AccessDeniedException: C:\Users\yidin\.m2\mvnd
        at org.mvndaemon.mvnd.common.DaemonRegistry.<init>(DaemonRegistry.java:79)
        at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:171)
        at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:98)
Caused by: java.nio.file.AccessDeniedException: C:\Users\yidin\.m2\mvnd
        at sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:509)
        at java.nio.file.Files.createDirectory(Files.java:689)
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:796)
        at java.nio.file.Files.createDirectories(Files.java:782)
        at org.mvndaemon.mvnd.common.DaemonRegistry.<init>(DaemonRegistry.java:72)
        ... 2 more

So I think what I need is for mvnd to ignore this failure and print a warning message instead.

@ppalaga
Copy link
Contributor

ppalaga commented Dec 21, 2020

Failure to create the DaemonRegistry cannot be ignored because it is vital for the daemon. You can pass an alternative registry location via -Dmvnd.daemonStorage=/some/writable/path on the command line or by adding mvnd.daemonStorage=/some/writable/path to ~/.m2/mvnd.properties. Does that help?

@yiding-he
Copy link
Author

Seems it works, thanks!
qiniML1Se9

@ppalaga ppalaga added this to the No fix/wont't fix milestone Jan 7, 2021
@gnodet gnodet added the wontfix This will not be worked on label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants