Wicket
  1. Wicket
  2. WICKET-4438 Make Wicket more OSGi friendly
  3. WICKET-4439

Move classes around so that there are no two packages with the same name in different modules

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.0-beta1
    • Fix Version/s: 6.0.0-beta1
    • Component/s: None
    • Labels:
      None

      Description

      There are several packages which appear in at least two wicket- modules. This causes some troubles when deploying these modules in OSGi containers.
      See http://markmail.org/message/e3isxaqirce2yyfd for more info.

      1. WICKET-4439-test.patch
        7 kB
        Martin Grigorov
      2. WICKET-4439.patch
        369 kB
        Martin Grigorov
      3. OsgiPackageAnalyserScript.java
        3 kB
        Andreas Pieber

        Activity

        Hide
        Martin Grigorov added a comment -

        The patch is applied in master.

        Please create a new ticket under WICKET-4438 if there are more OSGi related issues.

        Show
        Martin Grigorov added a comment - The patch is applied in master. Please create a new ticket under WICKET-4438 if there are more OSGi related issues.
        Hide
        Andreas Pieber added a comment -

        thank you very much for the branch

        I think an explicit blacklist in the test is the better way to go; that way we really have to think if we want to exclude a package or not.

        Show
        Andreas Pieber added a comment - thank you very much for the branch I think an explicit blacklist in the test is the better way to go; that way we really have to think if we want to exclude a package or not.
        Hide
        Martin Grigorov added a comment -

        Done. The changes are committed to branch sandbox/wicket4439.

        About the "endsWith(.classes)" - I did it this way to ignore META-INF folders and the files inside because they exist in all modules. Should I blacklist just them ?

        Show
        Martin Grigorov added a comment - Done. The changes are committed to branch sandbox/wicket4439. About the "endsWith(.classes)" - I did it this way to ignore META-INF folders and the files inside because they exist in all modules. Should I blacklist just them ?
        Hide
        Andreas Pieber added a comment -

        damned... because of some windows-line-endings git apply of WICKET-4439.patch fails terribly for me on master (with/without core.autocrlf and --reject to the apply option). Can you pls push the changes into a new branch directly in the wicket repo on e.g. github? Thank you very much.

        Show
        Andreas Pieber added a comment - damned... because of some windows-line-endings git apply of WICKET-4439 .patch fails terribly for me on master (with/without core.autocrlf and --reject to the apply option). Can you pls push the changes into a new branch directly in the wicket repo on e.g. github? Thank you very much.
        Hide
        Andreas Pieber added a comment -

        The code snippet from https://gist.github.com/1977817 with the license to ASF for inclusion in ASF works

        Show
        Andreas Pieber added a comment - The code snippet from https://gist.github.com/1977817 with the license to ASF for inclusion in ASF works
        Hide
        Andreas Pieber added a comment -

        1) I'm still at evaluating WICKET-4439.patch checking if it works correctly to add the osgi manifest.
        2) I've copied and attached the src from OsgiPackageAnalyserScript here granting the "Licsensed for inclusion in ASF works" just to make sure that there are no license conflicts
        3) WICKET-4439-test.patch: I really like the approach; pretty cool work! Though one comment about line 207...

        if (className.endsWith(".class"))
        

        ...is not completely correct. The osgi import/export statements only describe which packages are available for resource loading. Therefore, if we need to load any packages with other resources than java code we need to check for a file (vs directory) in general rather than for a .class file.

        Show
        Andreas Pieber added a comment - 1) I'm still at evaluating WICKET-4439 .patch checking if it works correctly to add the osgi manifest. 2) I've copied and attached the src from OsgiPackageAnalyserScript here granting the "Licsensed for inclusion in ASF works" just to make sure that there are no license conflicts 3) WICKET-4439 -test.patch: I really like the approach; pretty cool work! Though one comment about line 207... if (className.endsWith( ".class" )) ...is not completely correct. The osgi import/export statements only describe which packages are available for resource loading. Therefore, if we need to load any packages with other resources than java code we need to check for a file (vs directory) in general rather than for a .class file.
        Hide
        Martin Grigorov added a comment -

        Add test that will stop us introducing such problems in future.

        Show
        Martin Grigorov added a comment - Add test that will stop us introducing such problems in future.
        Hide
        Martin Grigorov added a comment -

        A patch the moves only the colliding classes in o.a.w.core.

        {SAME_PACKAGE}

        .

        Show
        Martin Grigorov added a comment - A patch the moves only the colliding classes in o.a.w.core. {SAME_PACKAGE} .

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Martin Grigorov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development