On Tue, May 25, 2010 at 9:19 AM, Deng Ching <[email protected]> wrote:
> On Tue, May 25, 2010 at 7:52 AM, Eshan Sudharaka <[email protected] > >wrote: > > > here i have attached class diagrams for stage repo merge.(only for gather > > source artifact details + target repo details + copy jar + pom +merge > maven > > metadata ) > > > > > > On Mon, May 24, 2010 at 4:47 PM, Eshan Sudharaka <[email protected] > >wrote: > > > >> > >> gather details of repository(source repo) that we are going to merge > >> * Source artifact details > >> 1). group id > >> 2). artifact id > >> 3). version > >> (above tree can be find out using RepositoryMetaDataReader > class) > >> 4). sorce address(where the repo is located) > >> 5). addresses of the artifact pom file and the jar file to be > >> merged > >> gather details of target repository which the artifacts to be merged > >> 1). search for the artifact version in the target repo( using > >> metadataresolver class) > >> > >> >>>>>> ArtifactMergeDetails class (with appropriate variables > and > >> metods) > >> > >> > >> here we need to consider following use cases > >> > >> * version that we are going to merge is not found on target repo > >> 1) here we have to create following directory structure in side the > >> repo > >> > >> group id folder > artifact id folder(which is same as > >> artifact id of source repo) > >> 2) then we need to folder named with the artifact version in side > the > >> artifact id folder > >> > >> 3) then copy the source pom file and jar file in to that folder. > >> > >> >>>> ArtifactMerge class (will do above 1,2,3 task) > >> > >> > >> then we need to create maven meta data xml file, sha1 and md5 > files. > >> >>>>> MavenMetaDataCreator class , Sha1Creator class MD5cREATOR > >> class will do above tasks > > > > > Just to be clear again, you don't need to write/create the > MavenMetaDataCreator, Sh1Creator and MD5Creator classes since we already > have them in Archiva. Take a look at the UploadAction in archiva-webapp and > see how the metadata and checksums are generated. It might be worthwhile to > move out the code for this from the action class so you can re-use it in > the > merging. > >>>> so can we use one class to to get ther services from available classes in archiva..? > > I'm confused about the TargetArtifactDetails, what is the difference > between > the sourceArtifactDetailsList, availableArtifactList and > notAvailableArtifactList? >>>> if the artifact version that we are going to merge is already in the target repository i am going to put it in to availableArtifactList since we need to perforn two diffferent actions for both(target repo hit and target repo not hit) > The name of the class itself is also a bit > confusing.. It seems that it contains information about the target > repository, so maybe it should be renamed TargetRepositoryDetails? > > As for the SourceArtifactDetails, I'm not sure if this is still needed with > the repository API (since the path to the artifact can already be resolved > on the fly). > > > Thanks, > Deng > -- P.A.Eshan Sudharaka Dept of Computer Science and Engineering University of Moratuwa Sri Lanka
