There are several roads to building from source. Choose your own adventure!
Normally, mdm development uses mdm to manage its own dependencies. However, an alternative flow for bootstrapping mdm without the cyclic dependency on an existing mdm binary is also maintained in case you ever need to reboot your universe from source. :)
Clone this repo, pull down submodules, and then call ant
to build. In other words:
git clone https://github.com/polydawn/mdm.git
cd mdm
git submodule update --init --checkout
ant
The freshly built mdm
binary will now be located at target/dist/mdm
, ready to go.
Typically, however, mdm uses mdm to manage its own dependencies, and this results in sigificantly less onerous download times and on-disk size. This mechanism of bootstrapping dependency submodules works with plain git, but unnecessarily downloads all versions of dependencies, instead of only fetching the versions we need.
(The --checkout
option on git submodule update
asks git to disregard instructions in the .gitmodules
about whether or not to fetch a submodule. mdm
marks dependency repos such that a normal git submodule update
will not fetch them by default, since git submodule update
will fetch more data than necessary.)
Clone this repo, pull down submodules, and then call ant
to build. In other words:
git clone https://github.com/polydawn/mdm.git
cd mdm
git submodule update --init
mdm update
ant
The freshly built mdm
binary will now be located at target/dist/mdm
, ready to go.
(In this project, there's both a git submodule
as well as an mdm
command during setup.
This is because the project uses standard git submodules for linking source files, as well as using mdm for linking libraries.
If your project just uses mdm, your project won't need a git submodule update --init
step; the mdm
command is self contained.)
There's a script called mdma.sh
in this repository.
Once you've gotten ahold of an mdm
binary (either by building it from source or downloading an official release),
you can use the mdma script to put mdm through its paces --
it will create projects, make releases, and set up dependencies as you watch, and it pauses frequently if you want to take a peek around at the state of the demo projects.
This script can also be invoked as part of a build cycle: ant run-mdma
.
Mdm is also covered by tests using junit. These tests can be built and ran with ant run-test
.