[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Re: A "?"/.m2 folder is created by Maven
From:       Leira Hua <leirareg () gmail ! com>
Date:       2020-01-21 23:05:27
Message-ID: CAJs+wOombRHEBRe68KjWrqd5htfJZw9=d0TEGh=YpF+m=qkR6A () mail ! gmail ! com
[Download RAW message or body]


Sorry for the late reply.

The Java process in question is clj, which is the Clojure command line. I
only reproduced this issue in a Nix environment within a gLInux
distribution (A Debian based distro). I tried to run clj in NixOS, it
created $HOME/.m2 as expected, rather than $HOME/?/.m2 as in Nix in gLinux.

The steps I used to reproduce the issue are:

   1. Setup Nix environment in gLinux: curl https://nixos.org/nix/install |
   sh
   2. Start a nix shell with Clojure package:nix-shell -p clojure
   3. Run clj with strace: strace clj -e '(println "Hello!")' >
   /tmp/clj.strace 2>&1

After running clj, a $HOME/?/.m2 is created:

'/usr/local/google/home/leirahua/?/.m2'

I attached the strace here
<https://gist.github.com/leira/95a802cfb82431c7f7ee74f2bada8cc1>

Thanks,
Leira

On Sat, Dec 14, 2019 at 2:11 AM Michael Osipov <michaelo@apache.org> wrote:

> Am 2019-12-12 um 02:23 schrieb Leira Hua:
> > I use Nix under Debian. I installed clojure through nix-shell -p clojure.
> > clj successfully started the repl after downloaded some poms from maven.
> > Then I found there is a folder named ‘?' created under my $HOME. The
> maven
> > cache .m2 is under this ‘?' folder. I tried leiningen, it is the same.
> >
> > I suppose it should be a Java related issue rather than Clojure. So I
> tried
> > to install Maven and try with mvn. A simple mvn archetype:generate
> created
> > a '?'/.m2 folder under the current folder. mvn clean -X|grep setting
> shows:
> >
> > $ mvn clean -X|grep setting
> > [DEBUG]   Imported: org.apache.maven.settings < plexus.core
> > [DEBUG] Reading global settings from
> >
> /nix/store/jyrx2vh4kg1dhbyil63bclpkfhbq6r2i-apache-maven-3.6.2/maven/conf/settings.xml
> > [DEBUG] Reading user settings from ?/.m2/settings.xml
> >
> >
> > Where is this ‘?' folder from? Is it expected behavior? How do I get rid
> of
> > it?
>
> Delete ~/.m2 and start the Java process with strace, upload that file.
> We will see direct system calls.
>
> Michael
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic