Shindig
  1. Shindig
  2. SHINDIG-1691

Maven project enhancements to improve embedding and extending shindig-server

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta1
    • Fix Version/s: 2.5.0-beta1
    • Component/s: Build, Java
    • Labels:
      None

      Description

      As proposed on dev@shindig mailing list before, this issue is about enhancements for the Maven build configuration and modules to improve embedding and extending shindig-server for downstream projects like Apache Rave and further.

      The full proposal thread can be found here: http://mail-archives.apache.org/mod_mbox/shindig-dev/201201.mbox/%3C4F1F68F8.5010801%40douma.nu%3E

      In short, my proposal is the following, and I'll post a patch for these changes up for review shortly:

      a) Move java/server/src/main/java/* (sample container code)
      to new jar module java/sample-container
      b) Move java/server/src/main/webapps/*
      to new (shallow) war module java/server-resources
      c) Move resources currently merged into server module from ./../content and
      ../../config also into new (shallow) war module java/server-resources
      d) Add new pom module java/server-dependencies which (only) defines
      the runtime dependencies needed for the shindig-server module
      Note: this should also add new dependency on shindig-sample-container
      e) The remainder of the shindig-server module then only needs to have
      dependencies on the shindig-server-resources (war overlay) and
      shindig-server-dependencies (pom), as well as some needed test only
      dependencies for the remaining "endtoend" unit-tests

      The end result of the above will again be a shindig-server war equal to the current shindig-server war but now downstream users can more easily embed and extend it, with proper maven (transitive) dependency resolution support.

      The above changes really are quite trivial and will have zero impact for development and current end usages.

        Activity

        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3695/
        -----------------------------------------------------------

        (Updated 2012-01-30 13:16:15.179882)

        Review request for shindig.

        Changes
        -------

        fix link to SHINDIG-1691

        Summary
        -------

        This is an artificial patch showing the end result of the proposed changes.
        These changes assume several source moves, which cannot be reliably captured as an svn diff.
        If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually.

        Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted

        This addresses bug SHINDIG-1691.
        https://issues.apache.org/jira/browse/SHINDIG-1691

        Diffs


        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/pom.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerGuiceModule.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerHandler.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/SampleShiroRealm.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/ShiroGuiceModule.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-dependencies/pom.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/pom.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/authorize.jsp PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/web.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/login.jsp PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1235579
        http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1235579

        Diff: https://reviews.apache.org/r/3695/diff

        Testing
        -------

        Thanks,

        Ate

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3695/ ----------------------------------------------------------- (Updated 2012-01-30 13:16:15.179882) Review request for shindig. Changes ------- fix link to SHINDIG-1691 Summary ------- This is an artificial patch showing the end result of the proposed changes. These changes assume several source moves , which cannot be reliably captured as an svn diff. If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually. Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted This addresses bug SHINDIG-1691 . https://issues.apache.org/jira/browse/SHINDIG-1691 Diffs http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerGuiceModule.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerHandler.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/SampleShiroRealm.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/ShiroGuiceModule.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-dependencies/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/authorize.jsp PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/web.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/login.jsp PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1235579 http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1235579 Diff: https://reviews.apache.org/r/3695/diff Testing ------- Thanks, Ate
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3695/
        -----------------------------------------------------------

        (Updated 2012-01-30 13:38:57.710474)

        Review request for shindig.

        Changes
        -------

        Updated and fixed patch. Turned out getting source moves encoded properly in an svn diff is even more tricky than expected.
        Furthermore, Review Board doesn't seem to understand/recognize only summarized svn deletes (as produced with svn diff parameter --no-diff-deleted).

        FYI: this newest patch was made anew using a slightly different ordering of the steps, and generating the patch using: svn diff --show-copies-as-adds

        Summary
        -------

        This is an artificial patch showing the end result of the proposed changes.
        These changes assume several source moves, which cannot be reliably captured as an svn diff.
        If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually.

        Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted

        This addresses bug SHINDIG-1691.
        https://issues.apache.org/jira/browse/SHINDIG-1691

        Diffs (updated)


        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerGuiceModule.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerHandler.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/SampleShiroRealm.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/ShiroGuiceModule.java PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/authorize.jsp PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/web.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/login.jsp PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/container/SampleContainerGuiceModule.java 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/container/SampleContainerHandler.java 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/shiro/SampleShiroRealm.java 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/shiro/ShiroGuiceModule.java 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/WEB-INF/authorize.jsp 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/WEB-INF/web.xml 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/login.jsp 1237607
        http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1237607

        Diff: https://reviews.apache.org/r/3695/diff

        Testing
        -------

        Thanks,

        Ate

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3695/ ----------------------------------------------------------- (Updated 2012-01-30 13:38:57.710474) Review request for shindig. Changes ------- Updated and fixed patch. Turned out getting source moves encoded properly in an svn diff is even more tricky than expected. Furthermore, Review Board doesn't seem to understand/recognize only summarized svn deletes (as produced with svn diff parameter --no-diff-deleted). FYI: this newest patch was made anew using a slightly different ordering of the steps, and generating the patch using: svn diff --show-copies-as-adds Summary ------- This is an artificial patch showing the end result of the proposed changes. These changes assume several source moves , which cannot be reliably captured as an svn diff. If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually. Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted This addresses bug SHINDIG-1691 . https://issues.apache.org/jira/browse/SHINDIG-1691 Diffs (updated) http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerGuiceModule.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/container/SampleContainerHandler.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/SampleShiroRealm.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/src/main/java/org/apache/shindig/sample/shiro/ShiroGuiceModule.java PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/authorize.jsp PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/WEB-INF/web.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/src/main/webapp/login.jsp PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/container/SampleContainerGuiceModule.java 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/container/SampleContainerHandler.java 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/shiro/SampleShiroRealm.java 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/shiro/ShiroGuiceModule.java 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/WEB-INF/authorize.jsp 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/WEB-INF/web.xml 1237607 http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/login.jsp 1237607 http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1237607 Diff: https://reviews.apache.org/r/3695/diff Testing ------- Thanks, Ate
        Hide
        Ate Douma added a comment -

        As an example why this issue is quite important:
        See (just) encountered problem at Apache Rave, where we ended up with duplicate jars in our war overlay on shindig-server because maven cannot check and align 'inherited' dependencies from wars: RAVE-453

        Show
        Ate Douma added a comment - As an example why this issue is quite important: See (just) encountered problem at Apache Rave, where we ended up with duplicate jars in our war overlay on shindig-server because maven cannot check and align 'inherited' dependencies from wars: RAVE-453
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3695/
        -----------------------------------------------------------

        (Updated 2012-02-03 21:03:25.952279)

        Review request for shindig.

        Changes
        -------

        Another update to the patch. This time much smaller as I stopped trying to move svn source trees through svn diff patches (which simply doesn't work reliable).

        After this patch is applied, the following svn commands need to be executed to end up with the desired result (from the checkout root folder):

        $ svn move --parents java/server/src/main/java java/sample-container/src/main/java
        $ svn move --parents java/server/src/main java/server-resources/src/main

        Thanks to Jesse for the suggestion to solve it this way: much easier!

        Summary
        -------

        This is an artificial patch showing the end result of the proposed changes.
        These changes assume several source moves, which cannot be reliably captured as an svn diff.
        If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually.

        Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted

        This addresses bug SHINDIG-1691.
        https://issues.apache.org/jira/browse/SHINDIG-1691

        Diffs (updated)


        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/pom.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-dependencies/pom.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/pom.xml PRE-CREATION
        http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1235579
        http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1235579

        Diff: https://reviews.apache.org/r/3695/diff

        Testing
        -------

        Thanks,

        Ate

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3695/ ----------------------------------------------------------- (Updated 2012-02-03 21:03:25.952279) Review request for shindig. Changes ------- Another update to the patch. This time much smaller as I stopped trying to move svn source trees through svn diff patches (which simply doesn't work reliable). After this patch is applied, the following svn commands need to be executed to end up with the desired result (from the checkout root folder): $ svn move --parents java/server/src/main/java java/sample-container/src/main/java $ svn move --parents java/server/src/main java/server-resources/src/main Thanks to Jesse for the suggestion to solve it this way: much easier! Summary ------- This is an artificial patch showing the end result of the proposed changes. These changes assume several source moves , which cannot be reliably captured as an svn diff. If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually. Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted This addresses bug SHINDIG-1691 . https://issues.apache.org/jira/browse/SHINDIG-1691 Diffs (updated) http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-dependencies/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1235579 http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1235579 Diff: https://reviews.apache.org/r/3695/diff Testing ------- Thanks, Ate
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3695/#review4830
        -----------------------------------------------------------

        Ship it!

        LGTM

        I applied the patch, ran the SVN move commands and was then able to "mvn clean install" without any issues and successfully deployed/tested the resulting war file as well.

        It would be nice if someone else could do the same though (preferably someone who understands maven well) just to validate before I commit the changes to trunk.

        I'd like to commit by this Wednesday afternoon (2/8/2012) – maybe by 2PM eastern time? Does that give anyone interested enough time to review as well?

        If anyone would like more time to review please let me know.

        • Jesse

        On 2012-02-03 21:03:25, Ate Douma wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3695/

        -----------------------------------------------------------

        (Updated 2012-02-03 21:03:25)

        Review request for shindig.

        Summary

        -------

        This is an artificial patch showing the end result of the proposed changes.

        These changes assume several source moves, which cannot be reliably captured as an svn diff.

        If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually.

        Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted

        This addresses bug SHINDIG-1691.

        https://issues.apache.org/jira/browse/SHINDIG-1691

        Diffs

        -----

        http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/pom.xml PRE-CREATION

        http://svn.apache.org/repos/asf/shindig/trunk/java/server-dependencies/pom.xml PRE-CREATION

        http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/pom.xml PRE-CREATION

        http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1235579

        http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1235579

        Diff: https://reviews.apache.org/r/3695/diff

        Testing

        -------

        Thanks,

        Ate

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3695/#review4830 ----------------------------------------------------------- Ship it! LGTM I applied the patch, ran the SVN move commands and was then able to "mvn clean install" without any issues and successfully deployed/tested the resulting war file as well. It would be nice if someone else could do the same though (preferably someone who understands maven well) just to validate before I commit the changes to trunk. I'd like to commit by this Wednesday afternoon (2/8/2012) – maybe by 2PM eastern time? Does that give anyone interested enough time to review as well? If anyone would like more time to review please let me know. Jesse On 2012-02-03 21:03:25, Ate Douma wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3695/ ----------------------------------------------------------- (Updated 2012-02-03 21:03:25) Review request for shindig. Summary ------- This is an artificial patch showing the end result of the proposed changes. These changes assume several source moves , which cannot be reliably captured as an svn diff. If this patch is accepted, it probably is best to do (part of) the proposed steps as described in https://issues.apache.org/jira/browse/SHINDIG-1691 manually. Note: I've created this patch using svn 1.7.2 with (1.7+ only) command parameters: svn diff --show-copies-as-adds --no-diff-deleted This addresses bug SHINDIG-1691 . https://issues.apache.org/jira/browse/SHINDIG-1691 Diffs ----- http://svn.apache.org/repos/asf/shindig/trunk/java/sample-container/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-dependencies/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server-resources/pom.xml PRE-CREATION http://svn.apache.org/repos/asf/shindig/trunk/java/server/pom.xml 1235579 http://svn.apache.org/repos/asf/shindig/trunk/pom.xml 1235579 Diff: https://reviews.apache.org/r/3695/diff Testing ------- Thanks, Ate
        Hide
        Jesse Ciancetta added a comment -

        Patch from review committed in revision 1242896. Thanks Ate!

        Show
        Jesse Ciancetta added a comment - Patch from review committed in revision 1242896. Thanks Ate!
        Hide
        Paul Lindner added a comment -

        part of 2.5.0-beta1 release.

        Show
        Paul Lindner added a comment - part of 2.5.0-beta1 release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ate Douma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development