Maven Project Info Reports Plugin
  1. Maven Project Info Reports Plugin
  2. MPIR-85

Refactoring of dependency and dependency management report

    Details

    • Patch Submitted:
      Yes
    • Number of attachments :
      3

      Description

      I've tried to refactor the code from MPIR-83 a bit, because it used a lot of copied code.

      Important improvements:

      • Created a AbstractProjectInfoRenderer and AbstractDependencyRenderer.
        If this patch is accepted, I want to write all the renderers out of the inforeports in separate classes, with more code sharing. This is a start of that.
      • I changed the unit tests, because the expected and actual were reversed. This is the case in many of the info report unit tests.

      Please tell me what you think of it. I know it is only a start.

      1. comparators.patch
        27 kB
        Nick Stolwijk
      2. refactor.patch
        114 kB
        Nick Stolwijk
      3. refactor.patch
        114 kB
        Nick Stolwijk

        Activity

        Hide
        Vincent Siveton added a comment -

        IMHO it is a good work. Thanks!

        I have some comments on the code:

        • I dont like AbstractDependencies#getScope(Object) Why not using getScope() directly ?
        • could you provide some test cases for new comparator classes?

        Some comments on the Maven code convention:

        • we don't use final at all, specially in methods definition/signature
        • could you separated public/protected/private in each class to make the code more readingness?
        • could you comment a minimum with javadoc, specially abstract classes? Btw it is $Id: $ (with colon) for the @version tag

        I think you could go ahead.

        Show
        Vincent Siveton added a comment - IMHO it is a good work. Thanks! I have some comments on the code: I dont like AbstractDependencies#getScope(Object) Why not using getScope() directly ? could you provide some test cases for new comparator classes? Some comments on the Maven code convention: we don't use final at all, specially in methods definition/signature could you separated public/protected/private in each class to make the code more readingness? could you comment a minimum with javadoc, specially abstract classes? Btw it is $Id: $ (with colon) for the @version tag I think you could go ahead.
        Hide
        Vincent Siveton added a comment -

        Another thought for the getScope() issue: you could also create a wrapper for Artifact and Dependency

        Show
        Vincent Siveton added a comment - Another thought for the getScope() issue: you could also create a wrapper for Artifact and Dependency
        Hide
        Nick Stolwijk added a comment -

        Contains the Plugin, Artifact and Dependency Comparators for the refactoring, with unit tests.

        Show
        Nick Stolwijk added a comment - Contains the Plugin, Artifact and Dependency Comparators for the refactoring, with unit tests.
        Hide
        Nick Stolwijk added a comment -

        And now the right file.

        Added comparators and unit test for them in comparators.patch

        Show
        Nick Stolwijk added a comment - And now the right file. Added comparators and unit test for them in comparators.patch
        Hide
        Dennis Lundberg added a comment -

        Nick, which of the three patch files is it that should be applied? I'm a bit confused...

        Show
        Dennis Lundberg added a comment - Nick, which of the three patch files is it that should be applied? I'm a bit confused...
        Hide
        Vincent Siveton added a comment -

        Hi Nick,
        I am working to prepare the release of the MPIR. Could you send us a one-in-one patch? Tx

        Show
        Vincent Siveton added a comment - Hi Nick, I am working to prepare the release of the MPIR. Could you send us a one-in-one patch? Tx
        Hide
        Herve Boutemy added a comment -

        with r1100791, this is the last modification I can see from the patch that can be applied in the actual code

        if you have improvements to propose to actual code, please open another issue

        Show
        Herve Boutemy added a comment - with r1100791 , this is the last modification I can see from the patch that can be applied in the actual code if you have improvements to propose to actual code, please open another issue

          People

          • Assignee:
            Herve Boutemy
            Reporter:
            Nick Stolwijk
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: