maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyons, Roy" <>
Subject Re: System-wide, read-only repository
Date Tue, 29 Oct 2013 13:26:06 GMT
Unfortunately, you will always have something in $HOME/.m2/repository
because that's how maven works.

Can I suggest perhaps that you use zfs for deduplication in /home?
Otherwise, you can add something like
-Dmaven.repo.local=/tmp/${USER}_repository (with a mkdir -p in their
profile or something to make the directory ahead of time).  I believe this
can be added to MAVEN_OPTS and it would work...

Either way, with 200 students, I would recommend the zfs since there will
be LOTS of duplicated jars.

Making a single local cache is a very bad idea.  there isnt any locking,
so they would clobber each other and get errors.  One student would be
accessing the jar as part of compilation and the other will be
mid-overwriting the jar.  its messy.  Even messier if they change their
umask, and noone can read or write to the location.

So, thats my 2 bits on the topic.

On 10/29/13 4:38 AM, "Matthieu Moy" <> wrote:

>I have a setup with many users (200 students), each of them having a
>limited $HOME. I'm looking for a way to provide them the most common
>plugins and dependencies and save disk space.
>Is there a way to have a system-wide (e.g. /usr/share/maven/... or so)
>repository, where the sysadmin could download stuff that the students
>wouldn't have to download and store in their $HOME ?
>I found many solutions using a proxy, that would allow me to download
>from the intranet, but these solutions still require a local repository
>in $HOME/.m2/, so this saves bandwidth but not disk space. I also saw
>some people advising to set localRepository in their pom.xml, but this
>does not seem to be a good idea (not thread-safe), and doesn't really
>solve my issue, as I would like the system-wide repository to be
>read-only (managed by root only), and to come in addition to $HOME/.m2/,
>not as a replacement.
>Thanks in advance,
>Matthieu Moy
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message