Re: A local repository acting as a remote one

2006-02-07 Thread John Casey
When designing Maven 2, we found a need for metadata beyond the POM. 
This metadata has to be merged from multiple repositories, so the build 
can take the appropriate actions as if there were only one repository. 
This leads to a difference between the notion of a local repository 
(which really is now much more like a local-only cache) and a remote 
repository (which represents only a fragment of all knowledge available 
to a build).


In short, it was a design decision to make these two separate. We 
considered the case where users would want to reuse a local repository 
as a remote repository, and decided it wasn't a common enough use case 
to override these other design considerations.


What I'd suggest is creating a plugin that will traverse your local 
repository and perform some sort of artifact-deployment to a separate 
remote repository (you can follow the maven-deploy-plugin as a guide for 
this). I know that this will lead to some duplication between your local 
repository and the remote repository used by your devs, but consider 
this: do you really want your developers to pickup *everything* that 
lands in your local repository? Even the things that are still in 
progress, and not ready for general consumption? Wouldn't it be a better 
model to be a bit more deliberate in publishing to their repository? 
Just a thought.


Anyway, sorry for any inconvenience.

-john

Fabrice BELLINGARD wrote:

Hi Maveners,

My case is the following: with Maven 2, I want to have an intermediate
repository for my dev team, so that the developers don't download Jars from
Ibiblio but only from this very repository. This is a common use case lots
of people know.
The difference in my case is that I want to have it on my computer, and I
want my local repository to be this intermediate repository. So to sum up:
my local repository would be the remote repository of my teams. Why ?
Because of 2 main reasons that seem important to me:
- I want to control which components they use (so I don't want a Maven proxy
that would allow them to download any Jars they would want)
- I don't want to have twice the same Jars (once in the intermediate
repository and once in my local repository), because it would take twice the
required space on my hard drive
Theses are the reasons why I want to make my local repository accessible via
HTTP as a remote repository.

However, I made some tests and it seems that there are problems due to the
metadata files: when one of my dev's Maven connects to my local repository
to download a Jar, it can't find the maven metadata file and so my local
repository is blacklisted. It seems that local metadata is different from
remote metadata, which is a pain in my case...


So my questions are: is this the normal behaviour? did I miss something? is
there a workaround for that?
--> Maven developers: shouldn't it be possible to copy-paste a repository
and using it either ways as a remote or a local repository?

Thank you so much in advance for your answers, and please CC me when
answering, I'm not on the list for the moment.

Best regards,
Stephen Fabemn.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A local repository acting as a remote one

2006-02-07 Thread Max Cooper
On Mon, 2006-02-06 at 22:31 +0100, Fabrice BELLINGARD wrote:
> Hi Maveners,
> 
> My case is the following: with Maven 2, I want to have an intermediate
> repository for my dev team, so that the developers don't download Jars from
> Ibiblio but only from this very repository. This is a common use case lots
> of people know.
> The difference in my case is that I want to have it on my computer, and I
> want my local repository to be this intermediate repository. So to sum up:
> my local repository would be the remote repository of my teams. Why ?
> Because of 2 main reasons that seem important to me:
> - I want to control which components they use (so I don't want a Maven proxy
> that would allow them to download any Jars they would want)

You can setup maven-proxy so that it ONLY uses the files you add to it.
I am not sure if that solves your entire problem, but it is possible by
changing the maven.repo.list property in the maven-proxy.properties
file.

Sharing a local repository is somewhat dangerous, since it is used
during a build for inter-dependencies between your modules. It might be
best to have a separate shared repository from your local repository for
this reason.

-Max


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



A local repository acting as a remote one

2006-02-06 Thread Fabrice BELLINGARD
Hi Maveners,

My case is the following: with Maven 2, I want to have an intermediate
repository for my dev team, so that the developers don't download Jars from
Ibiblio but only from this very repository. This is a common use case lots
of people know.
The difference in my case is that I want to have it on my computer, and I
want my local repository to be this intermediate repository. So to sum up:
my local repository would be the remote repository of my teams. Why ?
Because of 2 main reasons that seem important to me:
- I want to control which components they use (so I don't want a Maven proxy
that would allow them to download any Jars they would want)
- I don't want to have twice the same Jars (once in the intermediate
repository and once in my local repository), because it would take twice the
required space on my hard drive
Theses are the reasons why I want to make my local repository accessible via
HTTP as a remote repository.

However, I made some tests and it seems that there are problems due to the
metadata files: when one of my dev's Maven connects to my local repository
to download a Jar, it can't find the maven metadata file and so my local
repository is blacklisted. It seems that local metadata is different from
remote metadata, which is a pain in my case...


So my questions are: is this the normal behaviour? did I miss something? is
there a workaround for that?
--> Maven developers: shouldn't it be possible to copy-paste a repository
and using it either ways as a remote or a local repository?

Thank you so much in advance for your answers, and please CC me when
answering, I'm not on the list for the moment.

Best regards,
Stephen Fabemn.