You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by Brett Porter <br...@apache.org> on 2004/10/01 01:19:06 UTC

Re: the use of a maven.properties file for maven.repo.local

You're definitely right about this, I've thought about that before. I shouldn't
answer emails when I've just gotten out of bed :)

Moving local out of ~/.m2/override.xml is fine, as long as that still remains as
a valid override.

How about not having a properties file for the repo, and encouraging the use of
a default, or setting the M2_OPTS environment variable with
-Dmaven.repo.local=foo if it is to be modified?

Cheers,
Brett

Quoting John Casey <jd...@commonjava.org>:

> The problem that I see with the current setup is that overrides.xml is a 
> POM...or at least, it's read using the model reader. This means that 
> anything we specify in overrides.xml can reasonably be expected to be 
> legal in any old project POM. If you specify an environment-specific 
> setting like maven.repo.local or java.home, your POM is non-portable; 
> it's that simple.
> 
> But there are deeper problems than this. Say I specify the local repo in 
> my project POM, and the inheritance actually leads to maven using this 
> locally-overridden value. Now, the local repo was used to resolve all of 
> my parent POMs, and then the local repo was switched. Anything I 
> resolved/downloaded during that process (POMs, artifacts of any kind) 
> must now be re-downloaded to the NEW local repo. I would argue the same 
> problem with the remote repo, but I think the reasons for allowing 
> project-override of the default remote repos list is too compelling to 
> ignore.
> 
> Why do we need to place local-environment settings in the POM, when 
> specification of these settings (a) is not essential for proper maven 
> functioning (local properties file is a good alternative), and (b) will 
> virtually guarantee non-portability.
> 
> My java.home is: /usr/java/jdk/current
> 
> What is yours? If you're using windows, our shared POM is broken.
> 
> -john
> 
> Brett Porter wrote:
> > -0
> > 
> > What is the reason not to have it in there? It's good to have just one 
> > configuration file for the site defaults and user overrides (and these 
> > must be a model so you can specify remote repositories, etc), and I'm 
> > sure there are other local settings that we might add later (javaHome?).
> > 
> > Unless its causing issues, I think there are probably bigger concerns at 
> > the moment.
> > 
> > Cheers,
> > Brett
> > 
> > Emmanuel Venisse wrote:
> > 
> >>> Hi,
> >>>
> >>> John and I were chatting about how the local repository is specified and
> >>> we were wondering if that might be one property that should be defined
> >>> outside of the POM as it is not really related to the POM. I can't think
> >>> of any other properties that might fall into this category but I thought
> >>> I would bring it up.
> >>>
> >>>   
> >>
> >>
> >> +1
> >>
> >> Emmanuel
> >>
> >>
> >>
> >>
> >>  
> >>
> > 
> > 
> > 
> > 
>