You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@archiva.apache.org by Eshan Sudharaka <es...@gmail.com> on 2010/06/22 02:00:21 UTC

class design for copying artifacts to the target repository

* get the Artifacts meta data of the source repository using SourceArtifacts
class.

* check weather those artifacts are available in the target repository using
metadata resolver.

so we need to consider following scenarios.

  1). Source artifact does not exist in the target repository.
  2). Source artifact already exist in the target repository


case : 1

    * create folder structure.
           > check rootname space folder exists. If not create it.
           > check gruop id folder space exists. if not create it.
           > check artifact id folder exist. if not create it.
           > then create a folder name version number.
    * copy jar or war + pom files.
    * create check sum files and maven metadata xml file using archiva
availble classes.

case : 2

    * here we need to allow either replacing existing artifact or skip the
merging
    * if we are going to merge follow the same procedure as case 1.


-- 
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka

Re: class design for copying artifacts to the target repository

Posted by Deng Ching <oc...@apache.org>.
On Tue, Jun 22, 2010 at 8:00 AM, Eshan Sudharaka <es...@gmail.com>wrote:

> * get the Artifacts meta data of the source repository using
> SourceArtifacts
> class.
>
> * check weather those artifacts are available in the target repository
> using
> metadata resolver.
>
> so we need to consider following scenarios.
>
>  1). Source artifact does not exist in the target repository.
>  2). Source artifact already exist in the target repository
>
>
> case : 1
>
>    * create folder structure.
>           > check rootname space folder exists. If not create it.
>           > check gruop id folder space exists. if not create it.
>           > check artifact id folder exist. if not create it.
>           > then create a folder name version number.
>    * copy jar or war + pom files.
>    * create check sum files and maven metadata xml file using archiva
> availble classes.
>
> case : 2
>
>    * here we need to allow either replacing existing artifact or skip the
> merging
>    * if we are going to merge follow the same procedure as case 1.
>

Yep, looks good..

-Deng