Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.9
    • Component/s: None
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Maven 2 POMs with dependencies is missing for Spring. It's a lot of extra job for maven 2 users to find out which dependencies Spring needs, and to have to include them manually.

      1. buildsources.sh
        0.6 kB
        Chris Wood
      2. spring-maven.tgz
        11 kB
        Carlos Sanchez

        Issue Links

          Activity

          Hide
          Sébastien Cesbron added a comment -

          I am using spring-remoting to do remoting but to configure it I need DispatcherServlet. This class is in spring-webmvc but spring-remoting does not depends on spring-webmvc. Althought I don't want to depend on spring-webmvc because it also depends on struts that I don't need and I also don't need mvc framework.
          Would it be possible to add DispatcherServlet inside spring-web instead of spring-webmvc ?

          Show
          Sébastien Cesbron added a comment - I am using spring-remoting to do remoting but to configure it I need DispatcherServlet. This class is in spring-webmvc but spring-remoting does not depends on spring-webmvc. Althought I don't want to depend on spring-webmvc because it also depends on struts that I don't need and I also don't need mvc framework. Would it be possible to add DispatcherServlet inside spring-web instead of spring-webmvc ?
          Hide
          Juergen Hoeller added a comment -

          Note that spring-webmvc does not depend on Struts itself; only spring-struts does. spring-webmvc just happens to include Tiles support, which in turn happens to be shipped as part of Struts. spring-webmvc essentially includes Spring's DispatcherServlet plus supporting classes (like for specific view technologies), just like spring-portlet includes Spring's DispatcherPortlet plus supporting classes. As a consequence, spring-webmvc has a lot of optional dependencies, which you can happily ignore unless you want to use the respective third-party technology.

          Note that Spring's notion of web MVC is much more general than that of other frameworks. Spring builds on a generic dispatching infrastructure there, with HTML pages essentially being a specific use case only: The infrastructure itself is generic enough to handle for example the generation of binary reports as well as the generation of protocol responses. The latter is what happens in case of HTTP-based remoting: It's simply Spring's dispatching infrastructure used to expose HTTP request handlers that happen to process a specific remoting protocol.

          Hence, I would argue that it is perfectly fine if you include spring-webmvc in your application, even if just for handling remoting protocols. Think about it as HTTP request dispatching infrastructure, which you use for processing a specific form of HTTP request. This is an intended use case that comes without any disadvantages, other than having a few further classes on the classpath.

          That said, there is actually an alternative in Spring 2.0: You can use Spring's HttpRequestHandlerServlet; check out its javadoc. Since all of Spring's remoting protocol handlers are HttpRequestHandlers, you can simply define them in your main application context and export them through corresponding HttpRequestHandlerServlet definitions (with the servlet-name matching the target bean name) in your web.xml. This is another way of exposing an HTTP request handler, as alternative to using the DispatcherServlet. HttpRequestHandlerServlet is in spring-web, not in spring-webmvc, so has less dependencies.

          Juergen

          Show
          Juergen Hoeller added a comment - Note that spring-webmvc does not depend on Struts itself; only spring-struts does. spring-webmvc just happens to include Tiles support, which in turn happens to be shipped as part of Struts. spring-webmvc essentially includes Spring's DispatcherServlet plus supporting classes (like for specific view technologies), just like spring-portlet includes Spring's DispatcherPortlet plus supporting classes. As a consequence, spring-webmvc has a lot of optional dependencies, which you can happily ignore unless you want to use the respective third-party technology. Note that Spring's notion of web MVC is much more general than that of other frameworks. Spring builds on a generic dispatching infrastructure there, with HTML pages essentially being a specific use case only: The infrastructure itself is generic enough to handle for example the generation of binary reports as well as the generation of protocol responses. The latter is what happens in case of HTTP-based remoting: It's simply Spring's dispatching infrastructure used to expose HTTP request handlers that happen to process a specific remoting protocol. Hence, I would argue that it is perfectly fine if you include spring-webmvc in your application, even if just for handling remoting protocols. Think about it as HTTP request dispatching infrastructure, which you use for processing a specific form of HTTP request. This is an intended use case that comes without any disadvantages, other than having a few further classes on the classpath. That said, there is actually an alternative in Spring 2.0: You can use Spring's HttpRequestHandlerServlet; check out its javadoc. Since all of Spring's remoting protocol handlers are HttpRequestHandlers, you can simply define them in your main application context and export them through corresponding HttpRequestHandlerServlet definitions (with the servlet-name matching the target bean name) in your web.xml. This is another way of exposing an HTTP request handler, as alternative to using the DispatcherServlet. HttpRequestHandlerServlet is in spring-web, not in spring-webmvc, so has less dependencies. Juergen
          Hide
          Johannes Brodwall added a comment -

          Ben, thanks for the responses and for the good work so far. While waiting for official Spring 2.0 source jars, I built my own. I am not certain that they all are correct (I used jar.exe instead of the source-plugin), but if you'd like them as a stop-gap measure, you can get the full set of source jars from my web site at: http://brodwall.com/johannes/dist/maven-src.zip

          I think the lesson learned from Matt is that it is better to have too many things be optional (in the beginning) than too few. As a maven user, I accept adding more dependencies much better than having to exclude them.

          Show
          Johannes Brodwall added a comment - Ben, thanks for the responses and for the good work so far. While waiting for official Spring 2.0 source jars, I built my own. I am not certain that they all are correct (I used jar.exe instead of the source-plugin), but if you'd like them as a stop-gap measure, you can get the full set of source jars from my web site at: http://brodwall.com/johannes/dist/maven-src.zip I think the lesson learned from Matt is that it is better to have too many things be optional (in the beginning) than too few. As a maven user, I accept adding more dependencies much better than having to exclude them.
          Hide
          Dave Brondsema added a comment -

          The spring-portlet dependency on spring-webmvc should be optional.

          Could "subreleases" (or whatever you want to call them) be made that only modify the pom files? E.g. spring-portlet-2.0-r1.pom

          Show
          Dave Brondsema added a comment - The spring-portlet dependency on spring-webmvc should be optional. Could "subreleases" (or whatever you want to call them) be made that only modify the pom files? E.g. spring-portlet-2.0-r1.pom
          Hide
          nebhale added a comment -

          POMs and jars uploaded for Spring 1.2.9. Please create new issues for any further POM related issues. Take note that at this time there is no plan to create javadoc and source jars for each spring module. That effort will be worked in the 2.0.x branch.

          Show
          nebhale added a comment - POMs and jars uploaded for Spring 1.2.9. Please create new issues for any further POM related issues. Take note that at this time there is no plan to create javadoc and source jars for each spring module. That effort will be worked in the 2.0.x branch.

            People

            • Assignee:
              nebhale
              Reporter:
              Aleksander Blomskøld
              Last updater:
              Trevor Marshall
            • Votes:
              121 Vote for this issue
              Watchers:
              60 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 7 weeks, 6 days ago