Sorry about that secure post.  I hit the wrong button.

Thanks for all your discussion.  I now understand why repositories must be 
defined in the pom.

Tim McGinnis
717 720-1962
Web Development
AES/PHEAA



From:
"Justin Edelson" <[email protected]>
To:
"Maven Users List" <[email protected]>
Date:
05/03/2010 10:20 PM
Subject:
Re: Why define repositories in settings.xml and pom?



This seems like a very specific use case. I think it's more to the point
to say that many people (including, I suspect, 100% of Maven developers)
use the same workstation to work on projects which are deployed to
different repositories, e.g. apache, codehaus, <shudder> java.net, a
corporate repository, etc. It doesn't make sense to deploy an apache.org
project to the codehaus repository or vice versa. Nor do you want to
deploy corporate artifacts to the java.net repository. Thus, artifact
deployment/distribution is project-specific.

However, in all of those cases, you can use the same mirror of central.
And which mirror you pick should be based on your environment, not the
particular project. It should either be the closet mirror or a "nearby"
caching repository manager.

If you want build reproducibility, you should be using release artifacts
and only reference repositories with immutability rules. You should be
able to reproduce a build using an entirely different mirror (again,
assuming repository immutability). If you reference mutable
repositories, you lose build reproducibility regardless of what you put
in your pom or settings.xml.

Justin

On 5/3/10 11:59 AM, Thiessen, Todd (Todd) wrote:
>> I think the best way to think about this is that the read 
>> side is (or should
>> be) an aspect of your environment whereas the write side is 
>> an aspect of your project.
> 
> Very true. But we should make it clear why reading is an aspect of your 
environment whereas writing is an aspect of your project.
> 
> I think the reason is when your deploying a project, you are doing so 
because you are making an actual change to the code itself. If you are 
already changing the code and the server to which you deploy to also 
happens to change, it is a relatively simple matter to change the pom at 
the same time you are changing the code.
> 
> However, you may want to build an EXACT version of software that was 
previously deployed but the repos you read from may not be the same since 
the time the software was first deployed to the time you want to repeat 
the build. Thus you don't want to touch any of the source code, including 
the pom. You can change the settings.xml file point to the repos you are 
currently reading from.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





==============================================================================
This message contains privileged and confidential information intended for the 
above addressees only.  If you
receive this message in error please delete or destroy this message and/or 
attachments.  

The sender of this message will fully cooperate in the civil and criminal 
prosecution of any individual engaging
in the unauthorized use of this message.
==============================================================================

Reply via email to