You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Waluk <mw...@gmail.com> on 2006/06/07 23:52:00 UTC

How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

I would love some advice...

I would like developers on my team to be able to checkout our maven project
from source control (Clearcase) and run the package goal on it to build it.
Ideally they need only install the maven eclipse plugin to execute that goal
within eclipse.

I've installed maven-proxy and loaded it with the dependencies and plugins
we use so far.  So finally to my question...

What is the best way to force all the developers to use maven-proxy?  Should
I specify it in the project pom.xml with <repository> and
<pluginRepository>tags?  Or should I put the entire maven install into
Clearcase with a
settings.xml file that specifies it with a <proxy> or <mirror> tag?

Since the maven-proxy will server multiple projects in the future it seems
like we should put it in the maven install settings.xml.  Is that what teams
are doing out there in order to simplify developers' lives (putting the
maven install with settings.xml in source control)?  We should be able to
share standard settings like this with the team automatically (rather than
each developer having to set the same settings in their personal
settings.xml).  My first attempt was to put a settings.xml file in the
project's "conf" directory but that didn't seem to get noticed.

As an aside, when you start maven-proxy it spits out this advice:  "Add the
following to your ~/build.properties file:
maven.repo.remote=http:/machine-name:9999/repository"  What
build.propertiesdo they mean?

Thanks for any and all help in getting us started using Maven!
- Michael

Re: How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

Posted by Alexandre Poitras <al...@gmail.com>.
By the way, the proxy element in settings.xml is used to specify a
HTTP proxy not a Maven-proxy.

On 6/7/06, Alexandre Poitras <al...@gmail.com> wrote:
> You should declare repositories in both and mirrors in settings.xml. A
> corporation wide parent pom is the best solution to define
> repositories but you still need to define them in settings.xml to
> handle 2 specific cases :
>
> 1) Being able to retrieve the parent pom.
> 2) Run indivual goals that don't need a pom.
>
>
> On 6/7/06, Wayne Fay <wa...@gmail.com> wrote:
> > We use ~/.m2/settings.xml for Maven-proxy configurations. If you use
> > <repo> in pom.xml, then your developers will always hit Central when
> > they build, which you probably want to avoid.
> >
> > I believe the build.properties reference is simply leftover from M1
> > and can be safely ignored for those of us using M2.
> >
> > Wayne
> >
> > On 6/7/06, Michael Waluk <mw...@gmail.com> wrote:
> > > I would love some advice...
> > >
> > > I would like developers on my team to be able to checkout our maven project
> > > from source control (Clearcase) and run the package goal on it to build it.
> > > Ideally they need only install the maven eclipse plugin to execute that goal
> > > within eclipse.
> > >
> > > I've installed maven-proxy and loaded it with the dependencies and plugins
> > > we use so far.  So finally to my question...
> > >
> > > What is the best way to force all the developers to use maven-proxy?  Should
> > > I specify it in the project pom.xml with <repository> and
> > > <pluginRepository>tags?  Or should I put the entire maven install into
> > > Clearcase with a
> > > settings.xml file that specifies it with a <proxy> or <mirror> tag?
> > >
> > > Since the maven-proxy will server multiple projects in the future it seems
> > > like we should put it in the maven install settings.xml.  Is that what teams
> > > are doing out there in order to simplify developers' lives (putting the
> > > maven install with settings.xml in source control)?  We should be able to
> > > share standard settings like this with the team automatically (rather than
> > > each developer having to set the same settings in their personal
> > > settings.xml).  My first attempt was to put a settings.xml file in the
> > > project's "conf" directory but that didn't seem to get noticed.
> > >
> > > As an aside, when you start maven-proxy it spits out this advice:  "Add the
> > > following to your ~/build.properties file:
> > > maven.repo.remote=http:/machine-name:9999/repository"  What
> > > build.propertiesdo they mean?
> > >
> > > Thanks for any and all help in getting us started using Maven!
> > > - Michael
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

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


Re: How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

Posted by Wayne Fay <wa...@gmail.com>.
I actually meant (but did not say explicitly) that we configure our
Maven Proxy as a Central mirror... This overrides Central and forces
everyone to use our Proxy, and helps to ensure that our builds are
repeatable etc as all required artifacts are available in our
corporate proxy.

Wayne

On 6/7/06, Alexandre Poitras <al...@gmail.com> wrote:
> You should declare repositories in both and mirrors in settings.xml. A
> corporation wide parent pom is the best solution to define
> repositories but you still need to define them in settings.xml to
> handle 2 specific cases :
>
> 1) Being able to retrieve the parent pom.
> 2) Run indivual goals that don't need a pom.
>
>
> On 6/7/06, Wayne Fay <wa...@gmail.com> wrote:
> > We use ~/.m2/settings.xml for Maven-proxy configurations. If you use
> > <repo> in pom.xml, then your developers will always hit Central when
> > they build, which you probably want to avoid.
> >
> > I believe the build.properties reference is simply leftover from M1
> > and can be safely ignored for those of us using M2.
> >
> > Wayne
> >
> > On 6/7/06, Michael Waluk <mw...@gmail.com> wrote:
> > > I would love some advice...
> > >
> > > I would like developers on my team to be able to checkout our maven project
> > > from source control (Clearcase) and run the package goal on it to build it.
> > > Ideally they need only install the maven eclipse plugin to execute that goal
> > > within eclipse.
> > >
> > > I've installed maven-proxy and loaded it with the dependencies and plugins
> > > we use so far.  So finally to my question...
> > >
> > > What is the best way to force all the developers to use maven-proxy?  Should
> > > I specify it in the project pom.xml with <repository> and
> > > <pluginRepository>tags?  Or should I put the entire maven install into
> > > Clearcase with a
> > > settings.xml file that specifies it with a <proxy> or <mirror> tag?
> > >
> > > Since the maven-proxy will server multiple projects in the future it seems
> > > like we should put it in the maven install settings.xml.  Is that what teams
> > > are doing out there in order to simplify developers' lives (putting the
> > > maven install with settings.xml in source control)?  We should be able to
> > > share standard settings like this with the team automatically (rather than
> > > each developer having to set the same settings in their personal
> > > settings.xml).  My first attempt was to put a settings.xml file in the
> > > project's "conf" directory but that didn't seem to get noticed.
> > >
> > > As an aside, when you start maven-proxy it spits out this advice:  "Add the
> > > following to your ~/build.properties file:
> > > maven.repo.remote=http:/machine-name:9999/repository"  What
> > > build.propertiesdo they mean?
> > >
> > > Thanks for any and all help in getting us started using Maven!
> > > - Michael
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

Posted by Alexandre Poitras <al...@gmail.com>.
You should declare repositories in both and mirrors in settings.xml. A
corporation wide parent pom is the best solution to define
repositories but you still need to define them in settings.xml to
handle 2 specific cases :

1) Being able to retrieve the parent pom.
2) Run indivual goals that don't need a pom.


On 6/7/06, Wayne Fay <wa...@gmail.com> wrote:
> We use ~/.m2/settings.xml for Maven-proxy configurations. If you use
> <repo> in pom.xml, then your developers will always hit Central when
> they build, which you probably want to avoid.
>
> I believe the build.properties reference is simply leftover from M1
> and can be safely ignored for those of us using M2.
>
> Wayne
>
> On 6/7/06, Michael Waluk <mw...@gmail.com> wrote:
> > I would love some advice...
> >
> > I would like developers on my team to be able to checkout our maven project
> > from source control (Clearcase) and run the package goal on it to build it.
> > Ideally they need only install the maven eclipse plugin to execute that goal
> > within eclipse.
> >
> > I've installed maven-proxy and loaded it with the dependencies and plugins
> > we use so far.  So finally to my question...
> >
> > What is the best way to force all the developers to use maven-proxy?  Should
> > I specify it in the project pom.xml with <repository> and
> > <pluginRepository>tags?  Or should I put the entire maven install into
> > Clearcase with a
> > settings.xml file that specifies it with a <proxy> or <mirror> tag?
> >
> > Since the maven-proxy will server multiple projects in the future it seems
> > like we should put it in the maven install settings.xml.  Is that what teams
> > are doing out there in order to simplify developers' lives (putting the
> > maven install with settings.xml in source control)?  We should be able to
> > share standard settings like this with the team automatically (rather than
> > each developer having to set the same settings in their personal
> > settings.xml).  My first attempt was to put a settings.xml file in the
> > project's "conf" directory but that didn't seem to get noticed.
> >
> > As an aside, when you start maven-proxy it spits out this advice:  "Add the
> > following to your ~/build.properties file:
> > maven.repo.remote=http:/machine-name:9999/repository"  What
> > build.propertiesdo they mean?
> >
> > Thanks for any and all help in getting us started using Maven!
> > - Michael
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

Posted by Wayne Fay <wa...@gmail.com>.
We use ~/.m2/settings.xml for Maven-proxy configurations. If you use
<repo> in pom.xml, then your developers will always hit Central when
they build, which you probably want to avoid.

I believe the build.properties reference is simply leftover from M1
and can be safely ignored for those of us using M2.

Wayne

On 6/7/06, Michael Waluk <mw...@gmail.com> wrote:
> I would love some advice...
>
> I would like developers on my team to be able to checkout our maven project
> from source control (Clearcase) and run the package goal on it to build it.
> Ideally they need only install the maven eclipse plugin to execute that goal
> within eclipse.
>
> I've installed maven-proxy and loaded it with the dependencies and plugins
> we use so far.  So finally to my question...
>
> What is the best way to force all the developers to use maven-proxy?  Should
> I specify it in the project pom.xml with <repository> and
> <pluginRepository>tags?  Or should I put the entire maven install into
> Clearcase with a
> settings.xml file that specifies it with a <proxy> or <mirror> tag?
>
> Since the maven-proxy will server multiple projects in the future it seems
> like we should put it in the maven install settings.xml.  Is that what teams
> are doing out there in order to simplify developers' lives (putting the
> maven install with settings.xml in source control)?  We should be able to
> share standard settings like this with the team automatically (rather than
> each developer having to set the same settings in their personal
> settings.xml).  My first attempt was to put a settings.xml file in the
> project's "conf" directory but that didn't seem to get noticed.
>
> As an aside, when you start maven-proxy it spits out this advice:  "Add the
> following to your ~/build.properties file:
> maven.repo.remote=http:/machine-name:9999/repository"  What
> build.propertiesdo they mean?
>
> Thanks for any and all help in getting us started using Maven!
> - Michael
>
>

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


Re: How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

Posted by Alexandre Poitras <al...@gmail.com>.
Or just distribute a little install script.

On 6/7/06, Edwin Punzalan <ep...@exist.com> wrote:
>
> If you don't want your developers to be creating their own
> setttings.xml, then I guess modifying maven.jar!conf/settings.xml is the
> better choice.
>
>
> Michael Waluk wrote:
> > I would love some advice...
> >
> > I would like developers on my team to be able to checkout our maven
> > project
> > from source control (Clearcase) and run the package goal on it to
> > build it.
> > Ideally they need only install the maven eclipse plugin to execute
> > that goal
> > within eclipse.
> >
> > I've installed maven-proxy and loaded it with the dependencies and
> > plugins
> > we use so far.  So finally to my question...
> >
> > What is the best way to force all the developers to use maven-proxy?
> > Should
> > I specify it in the project pom.xml with <repository> and
> > <pluginRepository>tags?  Or should I put the entire maven install into
> > Clearcase with a
> > settings.xml file that specifies it with a <proxy> or <mirror> tag?
> >
> > Since the maven-proxy will server multiple projects in the future it
> > seems
> > like we should put it in the maven install settings.xml.  Is that what
> > teams
> > are doing out there in order to simplify developers' lives (putting the
> > maven install with settings.xml in source control)?  We should be able to
> > share standard settings like this with the team automatically (rather
> > than
> > each developer having to set the same settings in their personal
> > settings.xml).  My first attempt was to put a settings.xml file in the
> > project's "conf" directory but that didn't seem to get noticed.
> >
> > As an aside, when you start maven-proxy it spits out this advice:
> > "Add the
> > following to your ~/build.properties file:
> > maven.repo.remote=http:/machine-name:9999/repository"  What
> > build.propertiesdo they mean?
> >
> > Thanks for any and all help in getting us started using Maven!
> > - Michael
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How best to specify maven-proxy - in settings.xml or as repository in pom.xml?

Posted by Edwin Punzalan <ep...@exist.com>.
If you don't want your developers to be creating their own 
setttings.xml, then I guess modifying maven.jar!conf/settings.xml is the 
better choice.


Michael Waluk wrote:
> I would love some advice...
>
> I would like developers on my team to be able to checkout our maven 
> project
> from source control (Clearcase) and run the package goal on it to 
> build it.
> Ideally they need only install the maven eclipse plugin to execute 
> that goal
> within eclipse.
>
> I've installed maven-proxy and loaded it with the dependencies and 
> plugins
> we use so far.  So finally to my question...
>
> What is the best way to force all the developers to use maven-proxy?  
> Should
> I specify it in the project pom.xml with <repository> and
> <pluginRepository>tags?  Or should I put the entire maven install into
> Clearcase with a
> settings.xml file that specifies it with a <proxy> or <mirror> tag?
>
> Since the maven-proxy will server multiple projects in the future it 
> seems
> like we should put it in the maven install settings.xml.  Is that what 
> teams
> are doing out there in order to simplify developers' lives (putting the
> maven install with settings.xml in source control)?  We should be able to
> share standard settings like this with the team automatically (rather 
> than
> each developer having to set the same settings in their personal
> settings.xml).  My first attempt was to put a settings.xml file in the
> project's "conf" directory but that didn't seem to get noticed.
>
> As an aside, when you start maven-proxy it spits out this advice:  
> "Add the
> following to your ~/build.properties file:
> maven.repo.remote=http:/machine-name:9999/repository"  What
> build.propertiesdo they mean?
>
> Thanks for any and all help in getting us started using Maven!
> - Michael
>

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