You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Radim Kolar <hs...@filez.com> on 2013/05/13 09:47:43 UTC

avoiding to write into user home

i got this report 
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/178529 user complaining 
about maven writing to home directory during compile.

Is there any command line argument to prevent this (to turn off caching).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: avoiding to write into user home

Posted by Ben Caradoc-Davies <Be...@csiro.au>.
+1. I have done this. Caching cannot be disabled: it is what maven does. 
But you can control where the cache is stored. The final step is to 
invoke maven with:

mvn -s /path/to/alternate/settings.xml

With this command-line option and settings defined as noted by Stephen 
below, nothing will be written to the user home directory.

Kind regards,
Ben.

On 13/05/13 16:12, Stephen Connolly wrote:
> The local repository cache is by default stored in ~/.m2/repository
>
> In the users or global settings this default can be changed to some other
> location. (See<localRepository>  in
> http://maven.apache.org/settings.html#Simple_Values)
>
> Keep in mind that the cache is not concurrent safe, and is definitely not
> designed to be shared by multiple users as it can and does get used to
> store a user's temporary build artifacts if they do "mvn install"
>
> Our recommendation is that each user has their own cache, and if there is a
> strong likelyhood of a user running multiple concurrent builds of the same
> or similar sets of artifacts then those builds should be using their own
> cache... e.g. a CI server should have a separate cache for each build job.
>
>
> On 13 May 2013 08:47, Radim Kolar<hs...@filez.com>  wrote:
>
>> i got this report http://www.freebsd.org/cgi/**
>> query-pr.cgi?pr=ports/178529<http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/178529>user complaining about maven writing to home directory during compile.
>>
>> Is there any command line argument to prevent this (to turn off caching).
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<us...@maven.apache.org>
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

-- 
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: avoiding to write into user home

Posted by Stephen Connolly <st...@gmail.com>.
The local repository cache is by default stored in ~/.m2/repository

In the users or global settings this default can be changed to some other
location. (See <localRepository> in
http://maven.apache.org/settings.html#Simple_Values)

Keep in mind that the cache is not concurrent safe, and is definitely not
designed to be shared by multiple users as it can and does get used to
store a user's temporary build artifacts if they do "mvn install"

Our recommendation is that each user has their own cache, and if there is a
strong likelyhood of a user running multiple concurrent builds of the same
or similar sets of artifacts then those builds should be using their own
cache... e.g. a CI server should have a separate cache for each build job.


On 13 May 2013 08:47, Radim Kolar <hs...@filez.com> wrote:

> i got this report http://www.freebsd.org/cgi/**
> query-pr.cgi?pr=ports/178529<http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/178529>user complaining about maven writing to home directory during compile.
>
> Is there any command line argument to prevent this (to turn off caching).
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<us...@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>