Re: central repo, snapshots and releases

2010-08-23 Thread ChadDavis
On Mon, Aug 23, 2010 at 3:24 PM, Brian Fox  wrote:
> The reason is simple:

Simple, but not obvious ;)

>
> Maven needs at least one snapshot repo configured, or it won't even
> attempt to ask anyone (specifically Nexus via the mirrorOf * setting)
> for any snapshots. Maven has built in an existing repository with the
> ID central but it is enabled only for releases. We must do either: 1)

I was kind of guessing that.  So, Maven, by default has the actual
Maven Central Repo defined under the id "central" . . . I didn't quite
realize that before.

> define another repo as snapshot only, or 2) enable snapshots for the
> built in central id. The example chooses 2. We could have used 1, but
> since I put in the example from years of habit, that's what stuck ;-)
>

So, in a nutshell, you've redefined the repo with id of central to
point somewhere else, the bogus URL, and then mirrored it with the
wildcard.


> You'll also note that I like to redefine the url as well so that when
> maven spits out what it's doing, it's immediately apparent if my
> settings are ignored or not.

Makes perfect sense.  Thanks for the explanation.

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



Re: central repo, snapshots and releases

2010-08-23 Thread Brian Fox
The reason is simple:

Maven needs at least one snapshot repo configured, or it won't even
attempt to ask anyone (specifically Nexus via the mirrorOf * setting)
for any snapshots. Maven has built in an existing repository with the
ID central but it is enabled only for releases. We must do either: 1)
define another repo as snapshot only, or 2) enable snapshots for the
built in central id. The example chooses 2. We could have used 1, but
since I put in the example from years of habit, that's what stuck ;-)

You'll also note that I like to redefine the url as well so that when
maven spits out what it's doing, it's immediately apparent if my
settings are ignored or not.

On Mon, Aug 23, 2010 at 2:36 PM, ChadDavis  wrote:
>> 
>> 
>> nexus
>> 
>> 
>> 
>> 
>> central
>> http://central
>> true
>> true
>> 
>> 
>> 
>> 
>> central
>> http://central
>> true
>> true
>> 
>> 
>> 
>> 
>> 
>> 
>> nexus
>> 
>> 
>>
>
> Thanks for the responses.  I'm still confused about the "logic" of
> that profile element in the settings.xml.  It sets up a mock central
> repo, for both plugins and artifacts, and enables snapshots and
> releases on this central mock.  Can someone illuminate what is going
> on there?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: central repo, snapshots and releases

2010-08-23 Thread ChadDavis
> 
> 
> nexus
> 
> 
> 
> 
> central
> http://central
> true
> true
> 
> 
> 
> 
> central
> http://central
> true
> true
> 
> 
> 
> 
> 
> 
> nexus
> 
> 
>

Thanks for the responses.  I'm still confused about the "logic" of
that profile element in the settings.xml.  It sets up a mock central
repo, for both plugins and artifacts, and enables snapshots and
releases on this central mock.  Can someone illuminate what is going
on there?

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



Re: central repo, snapshots and releases

2010-08-23 Thread Ron Wheeler

 On 23/08/2010 1:15 PM, Wendy Smoak wrote:

On Mon, Aug 23, 2010 at 1:09 PM, Ron Wheeler
  wrote:

So the client needs to configure 2 repositories- one for all the releases
and one for all the SNAPSHOTS.

You should be able to use a single repo url from the client -- the
repo managers have the concept of a 'virtual repository' or a
'repository group'.



Wendy is right.

Here is my slightly modified.settings.xml
to give a concrete example of a working configuration.

A lot of the configuration and brains on on the Nexus side.
It knows how to deploy a SNAPSHOT that gets sent its way regardless of 
what I call it on the client side.



http://maven.apache.org/SETTINGS/1.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
  http://maven.apache.org/xsd/settings-1.0.0.xsd";>


nexus
me_me_me
secret


nexus-snapshots
me_me_me
secret



c:\maven_repository/



nexus
*
http://repo.xxx.ccc:8081/nexus/content/groups/public




nexus




central
http://central
true
true




central
http://central
true
true






nexus




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



Re: central repo, snapshots and releases

2010-08-23 Thread Wendy Smoak
On Mon, Aug 23, 2010 at 1:09 PM, Ron Wheeler
 wrote:
> So the client needs to configure 2 repositories- one for all the releases
> and one for all the SNAPSHOTS.

You should be able to use a single repo url from the client -- the
repo managers have the concept of a 'virtual repository' or a
'repository group'.

-- 
Wendy

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



Re: central repo, snapshots and releases

2010-08-23 Thread Ron Wheeler

 Your nexus is a proxy for releases from central
Your Nexus has a place to host third party libraries that can not be 
distributed from Central due to licensing issues.

Your Nexus is a host for your releases
Your Nexus is a host for your SNAPSHOTs
When deploying you only deploy to the last 2

When getting releases, you want to set up Nexus to give you both your 
own stuff and the other sites that it hosts or proxies

When getting SNAPSHOTS you usually want your own snapshots
When deploying the client needs to tell the IDE where the releases go 
and where the SNAPSHOTS go.


So the client needs to configure 2 repositories- one for all the 
releases and one for all the SNAPSHOTS.


Nexus will respond to your requests for whichever sort of artifact that 
you want but it does need to keep separate lists of configured places on 
its side to keep things straight so the client needs 2 places to get 
things and to deploy things.



Ron


On 23/08/2010 12:45 PM, ChadDavis wrote:

I'm reading the Nexus book.  It describes how a given repository is
either for releases or snapshots.  It says that the central maven repo
is a release repository.  But then in the example for how to configure
a profile that will use the nexus served repository instead of
central, it shows configuring the central repo to lookup both
snapshots and releases.

This is a bit confusing . . . can someone elaborate.  First, is it
true that central repo only serves releases?  Second, what's going on
with the example configuration that turns on both releases and
snapshots for the central repo?

Thanks!

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





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