You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Berry <ch...@gmail.com> on 2005/09/28 23:31:35 UTC

repositories in settings.xml

Greetings,
Can one declare a <repository> at the top level of the <settings> . In
other words, outside of a <profile>??

Many of us use a few local repos -- say, a local mirror of ibiblio or
a local repo for internal JARs. -- common to all projects, and it
makes sense to me that this is a global setting per user.

If not, could someone explain profiles?? I get the idea behind them --
just not how they fit into the procedure?? It appears that one does
the following::

    m2 -P myglobalprofile install

which would seem a bit verbose to get at global settings -- where the
alternative is simply

   m2 install

Also it would appear that, since one can declare multiple profiles;

   m2 -P myglobalprofile,mylocalprofile install

 then repositories must be additive??

Thanks,
-- Chris

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


Re: repositories in settings.xml

Posted by Saleem Shafi <sa...@gmail.com>.
ah ha!  i found it..  check out the documentation in the settings.xml
file in your [maven2]/conf directory..   wouldn't it be swell if that
info found its way into the documentation of the Setting config file
online..

Saleem

On 9/28/05, Saleem Shafi <sa...@gmail.com> wrote:
> if i'm understanding your problem correctly, you should be able to
> define the profile with the repository settings you want and just
> declare that profile in the <activeProfiles/> element near the end of
> the file (http://maven.apache.org/maven2/maven-settings/settings.html)..
>  that should make that profile active all the time, which effectively
> makes it a global profile..
>
> i can't seem to find it now, but i remember reading something about
> that somewhere..
>
> Saleem.
>
>
> On 9/28/05, Chris Berry <ch...@gmail.com> wrote:
> > Greetings,
> > Can one declare a <repository> at the top level of the <settings> . In
> > other words, outside of a <profile>??
> >
> > Many of us use a few local repos -- say, a local mirror of ibiblio or
> > a local repo for internal JARs. -- common to all projects, and it
> > makes sense to me that this is a global setting per user.
> >
> > If not, could someone explain profiles?? I get the idea behind them --
> > just not how they fit into the procedure?? It appears that one does
> > the following::
> >
> >     m2 -P myglobalprofile install
> >
> > which would seem a bit verbose to get at global settings -- where the
> > alternative is simply
> >
> >    m2 install
> >
> > Also it would appear that, since one can declare multiple profiles;
> >
> >    m2 -P myglobalprofile,mylocalprofile install
> >
> >  then repositories must be additive??
> >
> > Thanks,
> > -- Chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Saleem Shafi
> Partner
> Pomatics Technology Partners LTD
> http://pomatics.com
> ph: 512.577.1472
> email: saleemshafi@pomatics.com
>


--
Saleem Shafi
Partner
Pomatics Technology Partners LTD
http://pomatics.com
ph: 512.577.1472
email: saleemshafi@pomatics.com

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


Re: repositories in settings.xml

Posted by Saleem Shafi <sa...@gmail.com>.
if i'm understanding your problem correctly, you should be able to
define the profile with the repository settings you want and just
declare that profile in the <activeProfiles/> element near the end of
the file (http://maven.apache.org/maven2/maven-settings/settings.html)..
 that should make that profile active all the time, which effectively
makes it a global profile..

i can't seem to find it now, but i remember reading something about
that somewhere..

Saleem.


On 9/28/05, Chris Berry <ch...@gmail.com> wrote:
> Greetings,
> Can one declare a <repository> at the top level of the <settings> . In
> other words, outside of a <profile>??
>
> Many of us use a few local repos -- say, a local mirror of ibiblio or
> a local repo for internal JARs. -- common to all projects, and it
> makes sense to me that this is a global setting per user.
>
> If not, could someone explain profiles?? I get the idea behind them --
> just not how they fit into the procedure?? It appears that one does
> the following::
>
>     m2 -P myglobalprofile install
>
> which would seem a bit verbose to get at global settings -- where the
> alternative is simply
>
>    m2 install
>
> Also it would appear that, since one can declare multiple profiles;
>
>    m2 -P myglobalprofile,mylocalprofile install
>
>  then repositories must be additive??
>
> Thanks,
> -- Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Saleem Shafi
Partner
Pomatics Technology Partners LTD
http://pomatics.com
ph: 512.577.1472
email: saleemshafi@pomatics.com

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


Re: repositories in settings.xml

Posted by Brett Porter <br...@gmail.com>.
just further to Saleem's response:

On 9/29/05, Chris Berry <ch...@gmail.com> wrote:
> Many of us use a few local repos -- say, a local mirror of ibiblio or
> a local repo for internal JARs. -- common to all projects, and it
> makes sense to me that this is a global setting per user.

for a local mirror of ibiblio, it is recommended to use the "mirrors"
element in settings.xml. This means any project trying to use
"central" will use that mirror first *instead*. Adding a new
repository means both are checked.

for information common to all projects, we recommend using an
organisation-wide parent POM that declares all the information. Of
course, this is a chicken and egg problem - you need the repository to
define the repository. The advantages to this are still:
- if you want to change the repository location you only need to
update that pom, not individual users computers (they get the new pom
from the old repository, and that is used for the new definition)
- you can share standard settings - organisation information, plugin
configuration, source layout, among all projects.

- Brett

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