What should a dependency management framework do?
I started to write an open-source, free dependency management framework for .NET/C++. Asking the question here I'm trying not to create yet another one no one needs. This desperate evening hobby of mine began after hopelessly trying to adopt tons of existing ones which couldn't satisfy my humble work and hobby needs:
- simple command-line interface which just works without requiring tangled ms-specific deploy开发者_Go百科ments and UI plugins; to be able to easily use it in a CI build script, or as a part of NAnt or MSBuild exec interface
- simple directory-based package repositories if you don't want to set up a repository server
- local package caching
- support for multiple repositories and repository chaining
- easy package compilation from a command line and publishing to a specific repository
- very simple package configuration file
- effective dependency tree resolution (i.e. dependencies of dependencies and deeper); conflicts detection; automatic dependency version upgrades;
Idea is simple if a solution has the following structure which is pretty standard across svn-based repositories:
/ (trunk?)
/include (3rdparty c++ header files)
/tools (some tools required to build your product, for example protobuf generator)
/other (random stuff which doesn't fit anywhere, like resources)
/lib (managed 3rdparty library binaries)
/src (the solution's source files)
In the root theres also .xml configuration file, describing your solution and containing:
- globally unique package id
- metadata (version, vendor, release notes etc)
- package dependencies (log4?, hibernate, boost etc) including version pattern, platform etc.
- files to take from /src folder in order to produce a package from your solution (if any)
Console tool allows to search repository for packages, resolve dependencies (they will be placed in /include, /lib and /tools folders), compile your package and publish it to a repository. /lib, /include, /tools folder content doesn't have to be commited to subversion, only the config xml in root folder.
The tool supports multiple repositories which are configured in an xml file located in user's home folder (if not overriden) where he can configure their priorities, locations, publishing options.
Written for .NET 4, but can easily refactor for Mono.
I won't paste the URL here to be banned for advertising.
精彩评论