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

mvnd assumes an .m2 folder in home directory #360

Closed
JSamir opened this issue Feb 15, 2021 · 2 comments
Closed

mvnd assumes an .m2 folder in home directory #360

JSamir opened this issue Feb 15, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation wontfix This will not be worked on

Comments

@JSamir
Copy link

JSamir commented Feb 15, 2021

Hi,

since I like to keep my home folder clean, I have changed the maven config according to this site: https://wiki.archlinux.org/index.php/XDG_Base_Directory

This way, I've got my settings.xml file in ~/.config/maven/settings.xml. Within my settings.xml file I've got this:

<localRepository>${env.XDG_CACHE_HOME}/maven/repository</localRepository>

With this aliases this works fine:

alias mvn="mvn -gs $XDG_CONFIG_HOME/maven/settings.xml"
alias mvnd="mvnd -gs $XDG_CONFIG_HOME/maven/settings.xml"

Except for the fact that mvnd is still creating some files in the .m2 folder:

❯ ls -l ~/.m2/mvnd/registry/0.4.1/
total 8784
-rw-r--r-- 1 samir samir 6292122 Feb 15 17:32 daemon-244f1c67.log
-rw-r--r-- 1 samir samir       0 Feb 15 16:12 daemon-244f1c67.out.log
-rw-r--r-- 1 samir samir 2682989 Feb 12 19:56 daemon-6db22e38.log
-rw-r--r-- 1 samir samir       0 Feb 12 16:53 daemon-6db22e38.out.log
-rw-r--r-- 1 samir samir    2498 Feb 12 16:53 purge-2021-02-12.log
-rw-r--r-- 1 samir samir     266 Feb 15 16:12 purge-2021-02-15.log
-rw-r--r-- 1 samir samir   32768 Feb 15 17:24 registry.bin
@JSamir JSamir changed the title mvnd assumes a .m2 folder in home directory mvnd assumes an .m2 folder in home directory Feb 15, 2021
@gnodet gnodet added the bug Something isn't working label Feb 15, 2021
@gnodet
Copy link
Contributor

gnodet commented Feb 15, 2021

Try with

alias mvnd="mvnd -Dmvnd.daemonStorage=$XDG_CONFIG_HOME/mvnd -gs $XDG_CONFIG_HOME/maven/settings.xml"

See mvnd --help for a list of all options.

@gnodet gnodet added help wanted Extra attention is needed documentation Improvements or additions to documentation and removed bug Something isn't working help wanted Extra attention is needed labels Feb 15, 2021
@JSamir
Copy link
Author

JSamir commented Feb 15, 2021

Thanks, works.

Although I am not exactly sure if this should go in .config or rather .cache directory.

Maybe you could consider adapting the defaults to the XDG standards?

@JSamir JSamir closed this as completed Feb 15, 2021
@ppalaga ppalaga added this to the No fix/wont't fix milestone Mar 9, 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
documentation Improvements or additions to documentation wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants