maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Caradoc-Davies <Ben.Caradoc-Dav...@csiro.au>
Subject Re: avoiding to write into user home
Date Mon, 13 May 2013 08:21:41 GMT
+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<hsn@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<users-unsubscribe@maven.apache.org>
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

-- 
Ben Caradoc-Davies <Ben.Caradoc-Davies@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


Mime
View raw message