archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: problems regarding using repository api.
Date Thu, 08 Jul 2010 05:25:08 GMT
I've been thinking about this, and there are basically two approaches:
- flesh out the storage repository api, and make the repository merger "format agnostic"
- make implementations of the merger for each repository type (similar to how you are suggesting).
It would only allow merging two identical formats (Which we agreed already anyway), and would
only support formats it specifically knows about

I think it has been unclear that maven-metadata.xml is completely different to metadata-model
and so on, and the work there is new.

So maybe you can take the second approach, and when the storage API exists later we might
generalise it.

That is, you'd have an RepositoryMerger interface, an AbstractRepositoryMerger (for things
not dependant on Maven2), and a Maven2RepositoryMerger (for things dependant on the Maven2
format).

You're correct, in the Maven2RM you would do those things.

In the AbstractRM, you would call the MetadataRepository to add new artifact metadata as needed
to the target repository.

Does that make more sense?

- Brett

On 28/06/2010, at 12:12 PM, Eshan Sudharaka wrote:

> hi ,
> I have implemented a class called ArtifactSMerger to copy the content of one
> repo to another. Here i have done the POM files copying and the jar/war
> copying. now i am working on merging metadata xml using repository
> api.(org.apache.maven.archiva.repository.metadata)
> 
> 1) . since version metadata xml is not depend on other versions we can
> simple copy it to the target location. is it ok ?
> 
> 2) . in order to update project metadata xml i am going to use repository
> api. I think we i can follow what
> you have done in the UploadAction class.
> 
> private void updateProjectMetadata( String targetPath, Date
> lastUpdatedTimestamp, String timestamp,
>                                        int buildNumber, boolean
> fixChecksums )
> 
> is it ok..?
> 
> thanks.
> 
> 
> 
> -- 
> P.A.Eshan Sudharaka
> Dept of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/





Mime
View raw message