From: William G. T. Jr. <wg...@rc...> - 2003-02-17 13:07:07
|
Many projects have the same problem. Ant for instance has the optional.jar. Here is how I solved this problem at the Japple project. There are two issues: *Building from Source *Binary Distribution In both cases, folks wishing to use the optional packages are responsible for getting the dependent 3rd party packages. * Building from Source 1) "Optional" functionality is kept is seperate modules under the root of the project tree. /spring/src - core spring code /spring/optional/struts-connector/src /spring/optional/bill's_cool_dom_view_constructor/src ... 2) The root build.xml simple calls down into the optional modules to build them. The optional modules have their own build.xml files which can check for 3rd party libs, etc. /spring/build.xml <ant dir="/optional/struts-connector" target="build"/> /spring/optional/struts-connector/build.xml * Binary Distribution I prefer to Keep It Simple and have a single binary distribution with all optional packages included. However, it is the users responsiblity to get 3rd party libs for optional components they wish to use. 1) package optional packages in a seperate jar(s) for inclusion in a simple bin dist 2) include only libs required to run core framework later. Bill Rod Johnson wrote: > Guys, > > I've just been discussing our forthcoming Struts integration with Yann and > Paul. > > This raises a problem that's likely to recur. This will probably involve > adding a small number of classes that are Struts-dependent. But not all > developers might be interested in them. > > In the following, read "Struts" to mean "any third party product some > classes will depend on but which aren't of interest to everyone". > > How can we prevent our whole source tree being Struts-dependent and prevent > developers uninterested in Struts from having to download the relevant Jars? > * Make it a separate CVS module? But this will lead to a profusion of CVS > modules. Harder to build etc. > * Put it in the main module and change the Ant build script to compile the > necessary classes and run the the relevant tests only if it finds Struts on > the classpath? This could eventually make the build script very long and > complicated. > * Better ideas I haven't thought off?? How do other projects handle this? > > From a distribution point of view, many users won't want the Struts classes > either. We could make them a sep download. Or we could just include them in > one of the main Jars, and they wouldn't do any harm unless they were used > without Struts. > > From a documentation view, we'll also need a dependencies table, showing > what depends on what. > > Regards, > Rod > > ____________________________________________________ > Rod Johnson > J2EE Architect and Author > +44 7973 409 132 > > Author of "Expert One-on-One J2EE Design and Development" > (Wrox Press, October 2002). > http://www.amazon.com/exec/obidos/tg/detail/-/1861007841/ > > http://www.wrox.com/books/1861007841.htm > > http://www.wrox.com/dynamic/books/find.aspx?author=Rod+Johnson > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |