archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohni, Daniel" <daniel.mo...@ch.unisys.com>
Subject RE: download artefacts from managed repositories
Date Thu, 26 Oct 2006 06:00:07 GMT
Hi Scott 

Answers inline...
 
> I am having a similar issue.  I have defined several managed
> repositories but the only ones that are consulted for artifacts are
> those that have proxies defined.  I got around that by creating dummy
> managed repositories and proxying them out to the real ones 
> but that is
> not a very secure solution.

if you remove line 187 of the 'DefaultProxyManager' you can access
all managed repositories without the use of dummies.
This was the way it was handled a few revisions earlier...

-> the download button on the web-app will not work anymore,
   but this only works if you have only 1 repository...

> Here are some questions that I would love to understand when 
> setting up
> my repos.
> 
> 
> Can I push artifacts to specific managed repositories via the 
> proxy url.
> (ie. http://localhost:8080/archiva/proxy/<repoId>/)  

As far as I know you currently can not publish tru archiva
 
> Can I download artifacts from only certain repositories if 
> desired (ie.
> http://localhost:8080/archiva/proxy/<repoId>/)  

Yes

> 
> Can I access specific repositories by name rather than all of them.
> 	For example I have a repository that I push artifacts to for
> dev, qa, stage and prod.  When I build I want to only upload and
> download to those repositories and some of my open source repos.  This
> allows me to build using profiles for all of my environments without
> risk of intermixing artifacts from different environments.

You defenitly can do this, this implies that the proxy url shoud stay
different for any repo.

 
> It would really help to clarify a set of use cases for how to set up a
> group of proxied and managed repositories for a complex enterprise.
> Once I understand how this all works I am more than happy to write a
> section for inclusion in the user guide.

I currently have setup 6 repositories

-> Maven_Release  (proxy to iBiblio and the sun legacy maven repo)
-> Maven_Snapshot (proxied to apache snapshot lib) 

-> Internal_Release
-> Internal_Snapshot 
	this repository is populated by continuum with internal
   	snapshot builds...                      
-> thirdParty_Release 
	this are not public jar's in release state (commercial)
-> thirdParty_Snapshot
	this is were the unstable non public jars go (commercial)

now when I read your post, i should maybe also have a Milestone repo
or even one for pre-integration builds.

btw. my idea to build milestones is tho have a separte build project
only containing the artifact pom with the correct dependencies...

what do you think about this ?

Regarding my earlier post:

I checked some more code and saw, that the indexer already uses
the repo_id.
currently org.apache.maven.model.Model to represent the artefacts,
and this model doesn't care about repositories and therefore
you can not access the repoId from the model.

-> one solution is to update the model with a repoId or
   make an ArchivaModel with the repoId.
   
i can have a look at this if one of the lead developers can give
me a hint in what subproject, package the new classes 
- ArchivaModel extends org.apache.maven.model.Model
- ArchivaProject extends org.apache.maven.project.MavenProject
- ArchivaProjectBuilder extends
org.apache.maven.project.MavenProjectBuilder
should go.

is this the correct way to go further ????

Any comments on this ?

- Daniel

> -----Original Message-----
> From: Mohni, Daniel [mailto:daniel.mohni@ch.unisys.com] 
> Sent: Tuesday, October 24, 2006 9:42 AM
> To: archiva-users@maven.apache.org
> Subject: download artefacts from managed repositories
> 
> Hello
> 
> I was checking the daily build for archiva today and I configured
> 2 repositories, one proxied to ibiblio and one without proxy.
> 
> Browsing the repository I can only download artefacts from proxied
> repositories. Artefacts in managed repositories are not handled.
> 
> I checked the code and found the problem in 
> 
> DefaultProxyManager.getProxyGroups()
> 
> Only Proxied Repositories are added to the group, and therefore only
> managed repositories will be searched for a requested artefact.
> 
> If I comment line 178 
> 
> // if ( !proxiedRepositories.isEmpty() )
> 
> then I can only download artefacts when I add the repoId in 
> the url for
> the download 
> 
> http://localhost:8080/archiva/proxy/<repoId>/...
> 
> now all artefacts are accessible...
> 
> Is this the way it should work, or should this be changed ?
> 
> if only 1 proxied repository is defined, then the downloads will work,
> because it is hendled like the default repo (Line 187-190).
> 
> -> as soon as you have more than on proxied repository (release,
> snapshot)
>    you will get problems.
> 
> If the indexer would add the repository_id to the model, the url could
> be modified to contain the repo_id
> 
> now, I can have a closer look, if this is the way to go...
> 
> - Daniel
> 
> 
> 
> --------------------------------------------------------------
> ----------------
> This message is intended only for the personal and 
> confidential use of the designated recipient(s) named. If you 
> are not the intended recipient of this message, you are 
> hereby notified that any review, dissemination, distribution 
> or copying of this message is strictly prohibited. This 
> communication is for information purposes only and should not 
> be regarded as an offer to sell or as a solicitation of an 
> offer to buy any financial product, an official confirmation 
> of any transaction, or as an official statement of Aurora 
> Loan Services. Email transmission cannot be guaranteed to be 
> secure or error-free. Therefore, we do not represent that 
> this information is complete or accurate and it should not be 
> relied upon as such. All information is subject to change 
> without notice.
> 
> 

Mime
View raw message