[ 
https://issues.apache.org/jira/browse/MNG-6880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17070429#comment-17070429
 ] 

Florian Wilhelm commented on MNG-6880:
--------------------------------------

Hi [~michael-o]

thanks for looking into this. From my understanding user.dir is set by the JVM. 
I do understand if you consider this out of scope for Maven, I just reported it 
because for me as a user of Maven this was not the behavior I expected. We do 
have a workaround that seems to be ok for our use case (we do set 
maven.local.repo explicitly, which to my understanding bypasses the issue). 
Still I think this may occur to other users who run maven builds in Docker on 
Jenkins.

Feel free to close this issue if it is not valid.

Kind regards

Florian

> Maven creates `?/m2` dir in pwd if run in Docker image with custom UID
> ----------------------------------------------------------------------
>
>                 Key: MNG-6880
>                 URL: https://issues.apache.org/jira/browse/MNG-6880
>             Project: Maven
>          Issue Type: Bug
>         Environment: Docker
>            Reporter: Florian Wilhelm
>            Priority: Major
>
> Hi,
> I'm not sure if this is a bug, but I consider the result problematic. What 
> happens is that if you run maven in a Docker container with a custom UID 
> (1000 in our case), the value of the system property user.home is ? which 
> leads to maven creating a m2 dir in the current working directory. We need to 
> use uid 1000 to get proper permissions in Jenkins (on the host). 
> I've created a reproducer here https://github.com/fwilhe/mvn-user-home-repro
> If you try to build the docker image, it will exit with code 1 if a ? 
> directory was created. I would expect this directory not to be created, but 
> rather use /tmp.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to