On 7/28/2016 1:29 PM, Demian Katz wrote: > I develop an open source project > (https://github.com/vufind-org/vufind) that depends on Solr, and I'm > trying to figure out if there is a better way to manage the Solr > dependency. Presently, I simply bundle Solr with my software by > committing the latest distribution to my Git repo. Over time, having > all of these large binaries is causing repository bloat and slow Git > performance. I'm beginning to wonder whether there's a better way. > With the rise in the popularity of dependency managers like NPM and > Composer, it seems like it might be nice to somehow be able to declare > Solr as a dependency and have it installed automatically on the client > side rather than bundling the whole gigantic application by hand... > however, as far as I can tell, there's no way to do this presently (at > least, not unless you count specialized niche projects like > https://github.com/projecthydra/hydra-jetty, which are not exactly > what I'm looking for). Just curious if others are dealing with this > problem in other ways, or if there are any tool-based approaches that > I haven't discovered on my own.
I wouldn't include Solr in my own project at all. I would probably request that the user download the binary artifact and put it in a predictable location, and configure my installation script to do the download if the file is not there. I would strongly recommend taking advantage of Apache's mirror system for that download -- although if you need a specific version of Solr, you will find that the mirror system only has the latest version, and you must go to the Apache Archives for older versions. To reduce load on the Apache Archive, you could place a copy of the binary on your own download servers ... and you could probably greatly reduce the size of that download by stripping out components that your software doesn't need. If users want to enable additional functionality, they would be free to download the full Solr binary from Apache. I once discovered that if optional components are removed (including some jars in the webapp), the Solr download drops from 150+ MB to about 25 MB. https://issues.apache.org/jira/browse/SOLR-6806 Thanks, Shawn