Archiva
  1. Archiva
  2. MRM-980

Ability to merge repositories

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4-M1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      45

      Description

      Need to be able to merge one repository into another, updating metadata and not overwriting existing artifacts.

      The source repository should remain unchanged.

      It should produce output listing what was merged and what wasn't.

      Additions to the target repo should show in the audit log.

      Related thread: http://www.nabble.com/Merging-repositories-ts19850359.html

      1. archiva-modules.patch
        11 kB
        Patti Arachchige Eshan Sudharaka
      2. archiva-modules.patch
        3 kB
        Patti Arachchige Eshan Sudharaka
      3. archiva-modules.patch
        1 kB
        Patti Arachchige Eshan Sudharaka
      4. archiva-modules.patch
        14 kB
        Patti Arachchige Eshan Sudharaka
      5. archiva-modules.patch
        11 kB
        Patti Arachchige Eshan Sudharaka
      6. archiva-modules.patch
        30 kB
        Patti Arachchige Eshan Sudharaka
      7. archiva-modules.patch
        28 kB
        Patti Arachchige Eshan Sudharaka
      8. archiva-modules.patch
        28 kB
        Patti Arachchige Eshan Sudharaka
      9. archiva-modules.patch
        27 kB
        Patti Arachchige Eshan Sudharaka
      10. archiva-modules.patch
        26 kB
        Patti Arachchige Eshan Sudharaka
      11. archiva-modules.patch
        85 kB
        Patti Arachchige Eshan Sudharaka
      12. archiva-modules.patch
        55 kB
        Patti Arachchige Eshan Sudharaka
      13. archiva-modules.patch
        55 kB
        Patti Arachchige Eshan Sudharaka
      14. archiva-modules.patch
        52 kB
        Patti Arachchige Eshan Sudharaka
      15. archiva-modules.patch
        54 kB
        Patti Arachchige Eshan Sudharaka
      16. archiva-modules.patch
        51 kB
        Patti Arachchige Eshan Sudharaka
      17. archiva-modules.patch
        15 kB
        Patti Arachchige Eshan Sudharaka
      18. archiva-modules.patch
        86 kB
        Patti Arachchige Eshan Sudharaka
      19. archiva-modules.patch
        74 kB
        Patti Arachchige Eshan Sudharaka
      20. archiva-webapp.patch
        31 kB
        Patti Arachchige Eshan Sudharaka
      21. ArtifactsMerger.java
        13 kB
        Patti Arachchige Eshan Sudharaka
      22. ArtifactsMerger.java
        11 kB
        Patti Arachchige Eshan Sudharaka
      23. ArtifactsMerger.java
        8 kB
        Patti Arachchige Eshan Sudharaka
      24. ArtifactsMerger.java
        6 kB
        Patti Arachchige Eshan Sudharaka
      25. SourceAritfacts.java
        4 kB
        Patti Arachchige Eshan Sudharaka
      26. stage-repository-merge.patch
        34 kB
        Patti Arachchige Eshan Sudharaka
      27. stage-repository-merge.patch
        44 kB
        Patti Arachchige Eshan Sudharaka
      28. stage-repository-merge.patch
        45 kB
        Patti Arachchige Eshan Sudharaka
      29. stage-repository-merge.patch
        35 kB
        Patti Arachchige Eshan Sudharaka
      30. stage-repository-merge.patch
        9 kB
        Patti Arachchige Eshan Sudharaka
      31. stage-repository-merge.patch
        31 kB
        Patti Arachchige Eshan Sudharaka
      32. stage-repository-merge.patch
        25 kB
        Patti Arachchige Eshan Sudharaka
      33. stage-repository-merge.patch
        91 kB
        Patti Arachchige Eshan Sudharaka
      34. stage-repository-merge.patch
        308 kB
        Patti Arachchige Eshan Sudharaka
      35. stage-repository-merge.patch
        40 kB
        Patti Arachchige Eshan Sudharaka
      36. stage-repository-merge.patch
        16 kB
        Patti Arachchige Eshan Sudharaka
      37. stage-repository-merge.patch
        16 kB
        Patti Arachchige Eshan Sudharaka
      38. stage-repository-merge.patch
        17 kB
        Patti Arachchige Eshan Sudharaka
      39. stage-repository-merge.patch
        15 kB
        Patti Arachchige Eshan Sudharaka
      40. stage-repository-merge.patch
        19 kB
        Patti Arachchige Eshan Sudharaka
      41. test-repository.patch
        91 kB
        Patti Arachchige Eshan Sudharaka
      1. MRM-980-broken-repos-page.png
        98 kB

        Issue Links

          Activity

          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          SourceArtifact class is responsible for retuning artifact metadata to the caller of a given repo id to the caller. here we can get the artifact meta data of the source artifacts in the repository that we are going to merge. caller has to first get the Artifacts object list and then parse artifacts to get the Artifact metadata list

          Show
          Patti Arachchige Eshan Sudharaka added a comment - SourceArtifact class is responsible for retuning artifact metadata to the caller of a given repo id to the caller. here we can get the artifact meta data of the source artifacts in the repository that we are going to merge. caller has to first get the Artifacts object list and then parse artifacts to get the Artifact metadata list
          Show
          Maria Odea Ching added a comment - Proposal for this is in: https://cwiki.apache.org/confluence/display/ARCHIVA/Staging+Repository+Merge
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          ongoing stage-repo-merging module

          Show
          Patti Arachchige Eshan Sudharaka added a comment - ongoing stage-repo-merging module
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          path for stage repo merge

          Show
          Patti Arachchige Eshan Sudharaka added a comment - path for stage repo merge
          Hide
          Maria Odea Ching added a comment -

          Comments on the patch:

          • the log4j.xml config in src/main/resources can already be removed, just use sl4fj logger for logging instead
          • remove dependency to archiva-xmlrpc-api, you shouldn't be using the Artifact class in that module since it's specifically for web services only. I think you should use the new repository API instead.
          • remove the commented out dependencies in the stage-repository-merge module
          • apply codestyle
          Show
          Maria Odea Ching added a comment - Comments on the patch: the log4j.xml config in src/main/resources can already be removed, just use sl4fj logger for logging instead remove dependency to archiva-xmlrpc-api, you shouldn't be using the Artifact class in that module since it's specifically for web services only. I think you should use the new repository API instead. remove the commented out dependencies in the stage-repository-merge module apply codestyle
          Hide
          Maria Odea Ching added a comment -

          For the SourceArtifactTest, extend PlexusInSpringTestCase instead of JUnit's TestCase so you can lookup the components. You also need to lookup the components you're using that's why you're getting the NPE when running the tests. See DependencyTreeBuilderTest as an example.

          Show
          Maria Odea Ching added a comment - For the SourceArtifactTest, extend PlexusInSpringTestCase instead of JUnit's TestCase so you can lookup the components. You also need to lookup the components you're using that's why you're getting the NPE when running the tests. See DependencyTreeBuilderTest as an example.
          Hide
          Maria Odea Ching added a comment -

          Also, the test() method in SourceArtifactsTest class is wrong. It should be as follows:

            metadataResolverControl.expectAndReturn( metadataResolver.getRootNamespaces(TEST_REPO_ID), (ArrayList<Artifact>)getRootNameSpace() );     
            // put the rest of the expected calls to metadataResolver here
          
            metadataResolverControl.replay();
            
            sa.getSourceArtifactList();
          
            metadataResolverControl.verify();
          
          Show
          Maria Odea Ching added a comment - Also, the test() method in SourceArtifactsTest class is wrong. It should be as follows: metadataResolverControl.expectAndReturn( metadataResolver.getRootNamespaces(TEST_REPO_ID), (ArrayList<Artifact>)getRootNameSpace() ); // put the rest of the expected calls to metadataResolver here metadataResolverControl.replay(); sa.getSourceArtifactList(); metadataResolverControl.verify();
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          patch with the test fixed test cases. here i have hard coded some values in the SourceArtifacts class.
          when i creating ArchivaArtifact object.(classifier and the type).

          Show
          Patti Arachchige Eshan Sudharaka added a comment - patch with the test fixed test cases. here i have hard coded some values in the SourceArtifacts class. when i creating ArchivaArtifact object.(classifier and the type).
          Hide
          Patti Arachchige Eshan Sudharaka added a comment - - edited

          here i have commented out one line in SourceArtifacts class when it uses facet to get classifier and the type. Still could not figure out the issue. sorry for attaching a patch which is not passing the test cases.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - - edited here i have commented out one line in SourceArtifacts class when it uses facet to get classifier and the type. Still could not figure out the issue. sorry for attaching a patch which is not passing the test cases.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          here i ckecked the condition for the facet like wise in ShowArtifactAction class. now the test cases are passing. so i need to know what should i do when the facet is null.(in order to assign type and the classifier to the ArchivaArtifact objects)

          Show
          Patti Arachchige Eshan Sudharaka added a comment - here i ckecked the condition for the facet like wise in ShowArtifactAction class. now the test cases are passing. so i need to know what should i do when the facet is null.(in order to assign type and the classifier to the ArchivaArtifact objects)
          Hide
          Maria Odea Ching added a comment -

          Well, you can probably set "jar" as a default value for null type. As for the classifier, it should be fine to set it to null since it's optional..

          Show
          Maria Odea Ching added a comment - Well, you can probably set "jar" as a default value for null type. As for the classifier, it should be fine to set it to null since it's optional..
          Hide
          Maria Odea Ching added a comment - - edited

          I've broken down the rest of the items that needs to be done and set some target dates (relative to the proposed timeline for GSoC):

          1. repository merge API (June 30)
            • repo merger
            • unit tests
          2. UI for repository merge (July 11)
            • button to merge repo
            • page showing conflicting artifacts
            • confirmation page
            • integration with repo merge API
          3. webapp tests (July 19)
          4. security (July 23)
          5. audit logging (July 31)

          Eshan, are you ok with the target dates?

          Show
          Maria Odea Ching added a comment - - edited I've broken down the rest of the items that needs to be done and set some target dates (relative to the proposed timeline for GSoC): repository merge API (June 30) repo merger unit tests UI for repository merge (July 11) button to merge repo page showing conflicting artifacts confirmation page integration with repo merge API webapp tests (July 19) security (July 23) audit logging (July 31) Eshan, are you ok with the target dates?
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          ok. i will try my best to achieve those task by target dates.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - ok. i will try my best to achieve those task by target dates.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          changes are done according to the comments. (when facet == null set the default type as jar and null clasifier)

          Show
          Patti Arachchige Eshan Sudharaka added a comment - changes are done according to the comments. (when facet == null set the default type as jar and null clasifier)
          Hide
          Brett Porter added a comment -

          For the patch so far, per my comments on dev@, I think this could be pushed into the MetadataRepository interface instead of here. The merge should provide something like a RepositoryMerger or RepositoryArtifactCopier interface instead.

          Some more general comments on the patch:

          • there's no need to use the ArchivaArtifact class - that's something that we're in the process of removing in favour of the content model
          • while either is fine, you might prefer to use Mockito for mocking objects for tests
          • the POM here has more dependencies than necessary - watch this carefully
          Show
          Brett Porter added a comment - For the patch so far, per my comments on dev@, I think this could be pushed into the MetadataRepository interface instead of here. The merge should provide something like a RepositoryMerger or RepositoryArtifactCopier interface instead. Some more general comments on the patch: there's no need to use the ArchivaArtifact class - that's something that we're in the process of removing in favour of the content model while either is fine, you might prefer to use Mockito for mocking objects for tests the POM here has more dependencies than necessary - watch this carefully
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          ArtifactsMerger class

          Show
          Patti Arachchige Eshan Sudharaka added a comment - ArtifactsMerger class
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          artifact merger class updated one.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - artifact merger class updated one.
          Hide
          Maria Odea Ching added a comment - - edited

          Hi Eshan, here are my comments on the ArtifactsMerger class you've attached:

          • the name of the method isArtifactAvailableIntagerRepo(ArchivaArtifact artifact) should be fixed to isArtifactAvailableInTargetRepo(..)
          • you'll have a problem in line 187 & 188, POM files are deployed as *.pom in the repo
          • avoid using UPPER CASE for the first letter of a variable name (convention is using small case for the first letter/word for variable names). See below:
            File SourceArtifactFile = new File(sourceRepoPath , artifactPath); 	//line 168
            
            File TargetArtifactFile = new File(targetRepoPath , artifactPath);	//line 170
            
          • in the method createFolderStructure(ArchivaArtifact artifact), you shouldn't be accessing the metadata.xml files because the merger shouldn't know about the layout/type of the repository. See Brett's comment regarding that in the dev list thread with subj: [GSoC] Staging repositories updates
          Show
          Maria Odea Ching added a comment - - edited Hi Eshan, here are my comments on the ArtifactsMerger class you've attached: the name of the method isArtifactAvailableIntagerRepo(ArchivaArtifact artifact) should be fixed to isArtifactAvailableInTargetRepo(..) you'll have a problem in line 187 & 188, POM files are deployed as *.pom in the repo avoid using UPPER CASE for the first letter of a variable name (convention is using small case for the first letter/word for variable names). See below: File SourceArtifactFile = new File(sourceRepoPath , artifactPath); //line 168 File TargetArtifactFile = new File(targetRepoPath , artifactPath); //line 170 in the method createFolderStructure(ArchivaArtifact artifact), you shouldn't be accessing the metadata.xml files because the merger shouldn't know about the layout/type of the repository. See Brett's comment regarding that in the dev list thread with subj: [GSoC] Staging repositories updates
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          here i have fixed issue regarding copying the POM files and the coding convention problem. And also updating project maven metadata is done using repository api. but i am still confusing why we cannot just copy version metadata xml (if it exists in the source artifact in the source repository ). since project meta data xml is depends on available versions i used API to update it.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - here i have fixed issue regarding copying the POM files and the coding convention problem. And also updating project maven metadata is done using repository api. but i am still confusing why we cannot just copy version metadata xml (if it exists in the source artifact in the source repository ). since project meta data xml is depends on available versions i used API to update it.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          updated version of ArtifactsMerger class.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - updated version of ArtifactsMerger class.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          updated version of artifactsmerger with test cases.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - updated version of artifactsmerger with test cases.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          patch with test repositories

          Show
          Patti Arachchige Eshan Sudharaka added a comment - patch with test repositories
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          test repositories to be added in to src/test

          Show
          Patti Arachchige Eshan Sudharaka added a comment - test repositories to be added in to src/test
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          sample artifacts were added to the test repository.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - sample artifacts were added to the test repository.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          test case is fixed(ArtifactsMerger)

          Show
          Patti Arachchige Eshan Sudharaka added a comment - test case is fixed(ArtifactsMerger)
          Hide
          Maria Odea Ching added a comment -

          Hi Eshan, applying the latest patch (the one for adding additional artifacts to test-repository module) causes test failures in maven2 repository support module. I added the 1.2.2 version in the expected versions resolved in Maven2MetadataResolverTest to fix the test failure.

          Also, the jar files weren't included in the diff file so I just added them locally. I've committed these to the branch in -r960320. Thanks!

          Show
          Maria Odea Ching added a comment - Hi Eshan, applying the latest patch (the one for adding additional artifacts to test-repository module) causes test failures in maven2 repository support module. I added the 1.2.2 version in the expected versions resolved in Maven2MetadataResolverTest to fix the test failure. Also, the jar files weren't included in the diff file so I just added them locally. I've committed these to the branch in -r960320. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          getArtifactsFrom(String repo)method id added to the MetadataRepository and its implementations with fixed test cases.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - getArtifactsFrom(String repo)method id added to the MetadataRepository and its implementations with fixed test cases.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          meta data updating and getArtifact() method is moved from merge module.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - meta data updating and getArtifact() method is moved from merge module.
          Hide
          Brett Porter added a comment -

          unfortunately this doesn't build due to the circular dependency introduced. I don't think any of the additions to the POMs are needed - the API should be using the new model only (ie, not ArchivaArtifact, but ArtifactMetadata - see the other getArtifactBy* methods for comparison).

          Can you provide the patch for this method separately to your other changes?

          While I don't generally like subtasks - perhaps it might be good to split this issue into subtasks for individual pieces of work (like adding that method) that we can see completed and move on to the next ones. What do you think?

          Show
          Brett Porter added a comment - unfortunately this doesn't build due to the circular dependency introduced. I don't think any of the additions to the POMs are needed - the API should be using the new model only (ie, not ArchivaArtifact, but ArtifactMetadata - see the other getArtifactBy* methods for comparison). Can you provide the patch for this method separately to your other changes? While I don't generally like subtasks - perhaps it might be good to split this issue into subtasks for individual pieces of work (like adding that method) that we can see completed and move on to the next ones. What do you think?
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          getArtifacts(...) method is added to repository api.(with fixed test cases)

          Show
          Patti Arachchige Eshan Sudharaka added a comment - getArtifacts(...) method is added to repository api.(with fixed test cases)
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          here i have attached the patch for RepositoryMerger ind it's implementation with the test case.Although the test passes there is an issue. I think it is because the test-repository we unpacked does not contains archiva metadata model. (i tried it for a real repo ). So then test throw an exception(because mock expectations a not defined yet).

          Show
          Patti Arachchige Eshan Sudharaka added a comment - here i have attached the patch for RepositoryMerger ind it's implementation with the test case.Although the test passes there is an issue. I think it is because the test-repository we unpacked does not contains archiva metadata model. (i tried it for a real repo ). So then test throw an exception(because mock expectations a not defined yet).
          Hide
          Maria Odea Ching added a comment -

          I already applied the latest patch to the branch in -r962756. Btw, I fixed the formatting of some of the classes. I noticed that there were some unused imports and variables declared in some of the classes. I didn't remove them for now since you might be using it in the next patches. Also, one of your tests is still using the test resources in src/ and not in target/

          Thanks!

          Show
          Maria Odea Ching added a comment - I already applied the latest patch to the branch in -r962756. Btw, I fixed the formatting of some of the classes. I noticed that there were some unused imports and variables declared in some of the classes. I didn't remove them for now since you might be using it in the next patches. Also, one of your tests is still using the test resources in src/ and not in target/ Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          i have attached the latest version of merging module with fixed test case. and also now i am using target directory for the test case. for the the time being i have commented out the test case of the ArtifactsMerger. (here SourceArtifacts class , ArtifactsMerger class with there test cases should be removed).

          thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - i have attached the latest version of merging module with fixed test case. and also now i am using target directory for the test case. for the the time being i have commented out the test case of the ArtifactsMerger. (here SourceArtifacts class , ArtifactsMerger class with there test cases should be removed). thanks.
          Hide
          Maria Odea Ching added a comment -

          Can you create the patch from the latest in branch? I already applied your previous patch and the last one has some of the same changes so I'm not able to apply it. Thanks!

          Show
          Maria Odea Ching added a comment - Can you create the patch from the latest in branch? I already applied your previous patch and the last one has some of the same changes so I'm not able to apply it. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          here the changes are done after get a svn up. so this can be applied with out conflicts. And is is it possible to delete ArtifactsMerger , ArtifactsMergerTest , SourceArtifacts , SourceArtifactsTest. (since they are not needed). I did not remove them because it may be caused to conflicts when you are applying the patch.

          Also in the test case now i am using target directory.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - here the changes are done after get a svn up. so this can be applied with out conflicts. And is is it possible to delete ArtifactsMerger , ArtifactsMergerTest , SourceArtifacts , SourceArtifactsTest. (since they are not needed). I did not remove them because it may be caused to conflicts when you are applying the patch. Also in the test case now i am using target directory. Thanks.
          Hide
          Maria Odea Ching added a comment -

          Latest patch committed to branch -r962977. Thanks!

          Show
          Maria Odea Ching added a comment - Latest patch committed to branch -r962977. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          removed unwanted classes.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - removed unwanted classes.
          Hide
          Maria Odea Ching added a comment -

          Patch to remove old classes applied to branch -r962979. Thanks Eshan!

          Show
          Maria Odea Ching added a comment - Patch to remove old classes applied to branch -r962979. Thanks Eshan!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment - - edited

          in this patch i have done following things.

          • when the user create a new repo there is a tick box to add a staging repo. For now the path of staging repo is not configurable and it creates the repository in the same directory level as the original repo.
            eg : original repo name = test then staging repo name = test-stage
          • when we go to see repositories in right hand side of each managed repositories there is a url to do merge. it will merge the repository with its stage repository.

          eg : lets say we are going to merge test repo. then it tries to merge test with test-merge repository.if it cannot find a repo called test-merge it returns a error.(not handle yet.)

          here only the happy flow is working.
          thanks

          Show
          Patti Arachchige Eshan Sudharaka added a comment - - edited in this patch i have done following things. when the user create a new repo there is a tick box to add a staging repo. For now the path of staging repo is not configurable and it creates the repository in the same directory level as the original repo. eg : original repo name = test then staging repo name = test-stage when we go to see repositories in right hand side of each managed repositories there is a url to do merge. it will merge the repository with its stage repository. eg : lets say we are going to merge test repo. then it tries to merge test with test-merge repository.if it cannot find a repo called test-merge it returns a error.(not handle yet.) here only the happy flow is working. thanks
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          to get the conflicts artifacts list here i have added a method in maven2RepositpryMerger class with the test cases. (this will be useful in the web apps)

          Show
          Patti Arachchige Eshan Sudharaka added a comment - to get the conflicts artifacts list here i have added a method in maven2RepositpryMerger class with the test cases. (this will be useful in the web apps)
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          Please review this patch. (since previous one contains some commented lines). sorry for that.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - Please review this patch. (since previous one contains some commented lines). sorry for that. Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          getConflictArtifacts() method is modified with the fixed test case.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - getConflictArtifacts() method is modified with the fixed test case. Thanks.
          Hide
          Maria Odea Ching added a comment -

          Hi Eshan, the patch seems to be missing the MergeAction class. I'm getting an error when running the webapp. Can you update the patch to include it? Thanks!

          Show
          Maria Odea Ching added a comment - Hi Eshan, the patch seems to be missing the MergeAction class. I'm getting an error when running the webapp. Can you update the patch to include it? Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          mergeAction class is added.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - mergeAction class is added.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          merge with skipping conflict artifacts is added.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - merge with skipping conflict artifacts is added.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          in previous patch merge with skipping conflicts method is not correct and here i have fixed it.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - in previous patch merge with skipping conflicts method is not correct and here i have fixed it. Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          merge all and merge with skipping functionalities are now only allowed to newly created managed repositories.Merging function is not allowed for the Internal repository and the snapshots repository.
          And staging repository is not displaying on the repositories.jsp.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - merge all and merge with skipping functionalities are now only allowed to newly created managed repositories.Merging function is not allowed for the Internal repository and the snapshots repository. And staging repository is not displaying on the repositories.jsp. Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          in this patch i have validate the repository id when the user creates a new repository and if the id contains word "stage" i just suggest him to go for a repo id with out the word "stage".

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - in this patch i have validate the repository id when the user creates a new repository and if the id contains word "stage" i just suggest him to go for a repo id with out the word "stage". Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          test case for the merge artifacts by skipping conflicts is added.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - test case for the merge artifacts by skipping conflicts is added. Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          please add testng-5.8-jdk15.jar file to the src/test/resources/test-repository-with-conflict-artifacts
          in merging module. this jar file is required to pass the test case.
          I tried to take a fresh copy of branch and apply that patch.It works fine just after adding that jar file.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - please add testng-5.8-jdk15.jar file to the src/test/resources/test-repository-with-conflict-artifacts in merging module. this jar file is required to pass the test case. I tried to take a fresh copy of branch and apply that patch.It works fine just after adding that jar file. Thanks.
          Hide
          Maria Odea Ching added a comment -

          Hi Eshan, can you attach the test artifacts as a zip file? They don't get included when you do diff, so they should be added separately I'm getting a test failure without them. Thanks!

          Show
          Maria Odea Ching added a comment - Hi Eshan, can you attach the test artifacts as a zip file? They don't get included when you do diff, so they should be added separately I'm getting a test failure without them. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          this should be added in to test/resources

          Thanks

          Show
          Patti Arachchige Eshan Sudharaka added a comment - this should be added in to test/resources Thanks
          Hide
          Maria Odea Ching added a comment -

          Applied latest patch to MRM-980 branch in -r965157.

          I noted a few things that need to be fixed:

          1. The repositories page is broken. See attached screenshot MRM-980-broken-repos-page.png
          2. Display/show the url of the attached staging repository in the repositories page so it would be easier to know when deploying from command line
          3. Maybe we can only have "Merge" in the Merge Actions in repositories page, then have the "Merge All" and "Merge with Skip" in the following page where the list of artifacts that are conflicting are listed.
          4. What about in the artifact web browse? After the merge is done, should the repository ID of the artifact be changed to the managed repo instead of the staging one?
          5. The merging doesn't seem to be working. I uploaded an artifact (from Upload Artifact in webapp) to the staging repo then clicked "Merge All". When I checked the managed repo, the artifact I uploaded in the staging repo wasn't merged.

          Thanks!

          Show
          Maria Odea Ching added a comment - Applied latest patch to MRM-980 branch in -r965157 . I noted a few things that need to be fixed: The repositories page is broken. See attached screenshot MRM-980 -broken-repos-page.png Display/show the url of the attached staging repository in the repositories page so it would be easier to know when deploying from command line Maybe we can only have "Merge" in the Merge Actions in repositories page, then have the "Merge All" and "Merge with Skip" in the following page where the list of artifacts that are conflicting are listed. What about in the artifact web browse? After the merge is done, should the repository ID of the artifact be changed to the managed repo instead of the staging one? The merging doesn't seem to be working. I uploaded an artifact (from Upload Artifact in webapp) to the staging repo then clicked "Merge All". When I checked the managed repo, the artifact I uploaded in the staging repo wasn't merged. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          following modifications are done

          1). in repositories page show only one button called merge. If conflicts are available show the conflicts and allow skipp conflicts and merge all functions. If no conflicts are available only allow merge function.

          2) repositories page is fixed.(broken one )

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - following modifications are done 1). in repositories page show only one button called merge. If conflicts are available show the conflicts and allow skipp conflicts and merge all functions. If no conflicts are available only allow merge function. 2) repositories page is fixed.(broken one ) Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          added following.

          • staging repository path is added to repositories page.
          • change the repository id from staging one to managed one after the merging is done.
          Show
          Patti Arachchige Eshan Sudharaka added a comment - added following. staging repository path is added to repositories page. change the repository id from staging one to managed one after the merging is done.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          removed unused actions in struts.xml and gave proper name for methods in MergeAction class.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - removed unused actions in struts.xml and gave proper name for methods in MergeAction class. Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          changes are done on repositories page .
          ( when user gives gives repository location with a name which is different to the repo id ) previously in that case staging repo location in not in repositories page

          Show
          Patti Arachchige Eshan Sudharaka added a comment - changes are done on repositories page . ( when user gives gives repository location with a name which is different to the repo id ) previously in that case staging repo location in not in repositories page
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          Audit logs are added when the user complete the merging.

          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - Audit logs are added when the user complete the merging. Thanks.
          Hide
          Maria Odea Ching added a comment -

          Patch submitted on 07/26 committed to MRM-980 branch in -r979534. Thanks Eshan!

          Show
          Maria Odea Ching added a comment - Patch submitted on 07/26 committed to MRM-980 branch in -r979534 . Thanks Eshan!
          Hide
          Maria Odea Ching added a comment -

          Hi Eshan, please see the issues I've filed that this one depends upon. These need to be fixed as well. Thanks!

          Show
          Maria Odea Ching added a comment - Hi Eshan, please see the issues I've filed that this one depends upon. These need to be fixed as well. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          MRM 1406, MRM 1404, MRM 1400, MRM 1397 are fixed.
          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - MRM 1406, MRM 1404, MRM 1400, MRM 1397 are fixed. Thanks.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          MRM 1405 is fixed.
          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - MRM 1405 is fixed. Thanks.
          Hide
          Maria Odea Ching added a comment -

          Hi Eshan, I'm getting test failures in archiva-webapp after applying the patch you submitted on 7/27 8:25pm. The failures are specifically in DeleteManagedRepositoryActionTest and EditManagedRepositoryActionTest.

          Also, would it be possible to submit each fix separately and attach it to their respective issues (e.g. 1 patch per issue fixed)? So it would be easier to track/isolate each fix. Thanks!

          Show
          Maria Odea Ching added a comment - Hi Eshan, I'm getting test failures in archiva-webapp after applying the patch you submitted on 7/27 8:25pm. The failures are specifically in DeleteManagedRepositoryActionTest and EditManagedRepositoryActionTest. Also, would it be possible to submit each fix separately and attach it to their respective issues (e.g. 1 patch per issue fixed)? So it would be easier to track/isolate each fix. Thanks!
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          MRM 1406 fixed.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - MRM 1406 fixed.
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          MRM 1400 is fixed.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - MRM 1400 is fixed.
          Hide
          Maria Odea Ching added a comment -

          I changed the variable name "targetRepoId" to "sourceRepoId" to avoid confusion, since it is the id of the staging repo. I've also updated the headings of the merge jsps and also the successful merging message. These were committed to the branch in -r981136.

          Show
          Maria Odea Ching added a comment - I changed the variable name "targetRepoId" to "sourceRepoId" to avoid confusion, since it is the id of the staging repo. I've also updated the headings of the merge jsps and also the successful merging message. These were committed to the branch in -r981136 .
          Hide
          Maria Odea Ching added a comment -

          I moved the merge jsps inside the admin/ dir in webapp in MRM-980-branch -r981149.

          Show
          Maria Odea Ching added a comment - I moved the merge jsps inside the admin/ dir in webapp in MRM-980 -branch -r981149 .
          Hide
          Patti Arachchige Eshan Sudharaka added a comment -

          added web app test for repository merging.
          Thanks.

          Show
          Patti Arachchige Eshan Sudharaka added a comment - added web app test for repository merging. Thanks.
          Hide
          Maria Odea Ching added a comment -

          Patch for selenium tests submitted to MRM-980 branch in -r985612.

          The only thing missing now is the documentation then we can merge this to trunk already.

          Show
          Maria Odea Ching added a comment - Patch for selenium tests submitted to MRM-980 branch in -r985612 . The only thing missing now is the documentation then we can merge this to trunk already.
          Hide
          Maria Odea Ching added a comment -

          Closing as fixed. All issues it depends on has been fixed, branch also merged to trunk in -r1002059. Thanks again for implementing this feature Eshan!

          Show
          Maria Odea Ching added a comment - Closing as fixed. All issues it depends on has been fixed, branch also merged to trunk in -r1002059. Thanks again for implementing this feature Eshan!

            People

            • Assignee:
              Maria Odea Ching
              Reporter:
              Wendy Smoak
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: