Camel
  1. Camel
  2. CAMEL-4209

Upgrade camel-guice to use guice 3.0

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: camel-guice
    • Labels:
      None

      Description

      As Guice 3.0 is released for a while, we should consider to upgrade the guice version of camel-guice.
      Here is the thread[1] which discusses about it.
      [1]http://camel.465427.n5.nabble.com/camel-guice-td4565474.html

      1. camel_guice_3.0.2.diff
        173 kB
        Josep Boix Requesens
      2. camel_guice_3.0.diff
        159 kB
        Josep Boix Requesens

        Activity

        Hide
        Tim Chen added a comment -

        Willem, as I mentioned on the mailing list. This doesn't actually require a release of camel to fix.
        Rather than have people wait for Camel 2.9.0 this can just be patched in guiceyfruit.
        Because of the nature of maven's dependency system, this will allow us to exclude the offending version of guiceyfruit and use the guice 3.0 compatible version of it.

        Unless the plan is to get rid of guiceyfruit?
        I guess that makes sense as the project seems pretty 'dead'. There has been patches for this for a while now and no one has bothered to review them.
        Which seems to have caused several projects to fork from it.

        Show
        Tim Chen added a comment - Willem, as I mentioned on the mailing list. This doesn't actually require a release of camel to fix. Rather than have people wait for Camel 2.9.0 this can just be patched in guiceyfruit. Because of the nature of maven's dependency system, this will allow us to exclude the offending version of guiceyfruit and use the guice 3.0 compatible version of it. Unless the plan is to get rid of guiceyfruit? I guess that makes sense as the project seems pretty 'dead'. There has been patches for this for a while now and no one has bothered to review them. Which seems to have caused several projects to fork from it.
        Hide
        Willem Jiang added a comment -

        Hi Tim,
        You are right, it more like a guicefruit issue instead of camel-guice issue.
        After digging the guicefruit code a while, I found James did some change on the guice core, so guicefruit cannot work with guice which from the central maven out of box. There may be some work to do.

        Show
        Willem Jiang added a comment - Hi Tim, You are right, it more like a guicefruit issue instead of camel-guice issue. After digging the guicefruit code a while, I found James did some change on the guice core, so guicefruit cannot work with guice which from the central maven out of box. There may be some work to do.
        Hide
        Tim Chen added a comment -

        Hey Willem any update on this one?
        Maybe the dependency on guicey-fruit isn't a good idea as it's not an active project.

        Show
        Tim Chen added a comment - Hey Willem any update on this one? Maybe the dependency on guicey-fruit isn't a good idea as it's not an active project.
        Hide
        Willem Jiang added a comment -

        Hi Tim,

        guicefruit has some changes on the guice code, I didn't get the source.
        Jame is in middle of some other project, I'm afraid this task will be hold for a while.

        Show
        Willem Jiang added a comment - Hi Tim, guicefruit has some changes on the guice code, I didn't get the source. Jame is in middle of some other project, I'm afraid this task will be hold for a while.
        Hide
        Raman Gupta added a comment -

        Guice 3.0 has been out since March...

        Also note that the Guice bundle uses package versions 1.3, not 3.0 – the former is the API version and the 3.0 is the "marketing" version. So the guiceyfruit and camel-guice bundles should import [1,2), not [2,3) as they do now.

        Show
        Raman Gupta added a comment - Guice 3.0 has been out since March... Also note that the Guice bundle uses package versions 1.3, not 3.0 – the former is the API version and the 3.0 is the "marketing" version. So the guiceyfruit and camel-guice bundles should import [1,2), not [2,3) as they do now.
        Hide
        surya added a comment -

        Hi Raman:

        Please see Camel CAMEL-4751 , I have submitted a patch for this and is now in 'Fixed Status'.

        peace,
        surya

        Show
        surya added a comment - Hi Raman: Please see Camel CAMEL-4751 , I have submitted a patch for this and is now in 'Fixed Status'. peace, surya
        Hide
        Tim Chen added a comment -

        Is there any update on this? It seems that it taking so long to do is a bad sign for Camel in general as it seems that certain technology choices that it's made has too tightly coupled it with dead dependencies?

        Show
        Tim Chen added a comment - Is there any update on this? It seems that it taking so long to do is a bad sign for Camel in general as it seems that certain technology choices that it's made has too tightly coupled it with dead dependencies?
        Hide
        Claus Ibsen added a comment -

        Tim, contributions is welcome.

        Show
        Claus Ibsen added a comment - Tim, contributions is welcome.
        Hide
        Claus Ibsen added a comment -

        And yes it would be nice to get rid of guicyfruit, and if that means loosing some capabilities, then so bo it.

        Show
        Claus Ibsen added a comment - And yes it would be nice to get rid of guicyfruit, and if that means loosing some capabilities, then so bo it.
        Hide
        Claus Ibsen added a comment -

        Anyone want to work on this? A camel-guice component that does not depend on guicyfruit and works with latest guice release?

        Show
        Claus Ibsen added a comment - Anyone want to work on this? A camel-guice component that does not depend on guicyfruit and works with latest guice release?
        Hide
        Josep Boix Requesens added a comment -

        Here is a patch I've created that uses guice 3.0 and removes guiceyfruit dependency.

        I've basically isolated the code from guiceyfruti to preserve the JSR 250 compliant module. Let me know if there is any further problem so I can fix it.

        Show
        Josep Boix Requesens added a comment - Here is a patch I've created that uses guice 3.0 and removes guiceyfruit dependency. I've basically isolated the code from guiceyfruti to preserve the JSR 250 compliant module. Let me know if there is any further problem so I can fix it.
        Hide
        Claus Ibsen added a comment -

        Josep, thanks for working on this.

        The patch has license headers that has (c) Google.
        Is it possible to have consistent license headers that is like the standard ASF license header?

        I dont think we can accept a patch that has code that is not (c) under the ASF ICLA.

        Show
        Claus Ibsen added a comment - Josep, thanks for working on this. The patch has license headers that has (c) Google. Is it possible to have consistent license headers that is like the standard ASF license header? I dont think we can accept a patch that has code that is not (c) under the ASF ICLA.
        Hide
        Josep Boix Requesens added a comment -

        Hi Claus,

        I took the code directly from google-guice repositories since these classes are no longer in 3.0 but they were required in order to use guiceyfruit modules and I didn't want to simply remove the Copyright notice (although its licensed under Apache License 2.0), how should I proceed to have the consisten ASF license header without incurring in copyright infringement? I'm no license expert so I would most grateful if you can give some guidance on the matter. Could it be possible by simply modifying the code?

        Thanks for the feedback.

        Show
        Josep Boix Requesens added a comment - Hi Claus, I took the code directly from google-guice repositories since these classes are no longer in 3.0 but they were required in order to use guiceyfruit modules and I didn't want to simply remove the Copyright notice (although its licensed under Apache License 2.0), how should I proceed to have the consisten ASF license header without incurring in copyright infringement? I'm no license expert so I would most grateful if you can give some guidance on the matter. Could it be possible by simply modifying the code? Thanks for the feedback.
        Hide
        Willem Jiang added a comment -

        Just found the original place[1] of the two Google Copyright files, I think it should be OK to remove the header this time.
        [1]http://code.google.com/p/google-guice/issues/detail?id=259&start=100

        Show
        Willem Jiang added a comment - Just found the original place [1] of the two Google Copyright files, I think it should be OK to remove the header this time. [1] http://code.google.com/p/google-guice/issues/detail?id=259&start=100
        Hide
        Josep Boix Requesens added a comment -

        Thanks Willem, here is the patch with the fixed headers.

        Show
        Josep Boix Requesens added a comment - Thanks Willem, here is the patch with the fixed headers.
        Hide
        Claus Ibsen added a comment -

        Thanks for the patch. We should get this into the 2.11 codebase, as this ticket is popular

        Show
        Claus Ibsen added a comment - Thanks for the patch. We should get this into the 2.11 codebase, as this ticket is popular

          People

          • Assignee:
            Willem Jiang
            Reporter:
            Willem Jiang
          • Votes:
            8 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development