Be just enough. Be useful. Don't overreach. Don't impose. Don't Repeat Yourself.

Moxie is not designed to be Maven. It is designed to be an Ant enhancement for a Maven-dominated world.

Dependency Management

Moxie does not use Ivy nor Maven to retrieve artifacts or to solve transitive dependencies. It has it's own solution engine written based on the Maven, Ivy, and Gradle documentation.

Moxie employs a two-pass solver which is executed for each scope (compile, test, etc).

  1. The first pass retrieves POMs for all dependencies regardless of scope by walking up and down the dependency graph.
  2. The second pass generates the complete tree of resolved artifacts and then employs the nearest rule to eliminate duplicates in the graph.

Dependency Resolution

To improve the efficiency of dependency resolution, Moxie uses the following information sources to re-order your repositories, per-dependency, to hopefully download the dependency from the first repository contacted:

  1. manually defined groupId affinities
  2. known origin urls (primarily used for metadata and SNAPSHOT updates)
  3. repository .meta/prefixes.txt, offered by some Maven repositories
  4. user-defined order in repositories setting

Version Ranges

Version ranges are the ugly duckling of Moxie. They are only partially supported. Maven (Aether) has a very sophisticated mechanism for dealing with version ranges which Moxie will never attempt to reproduce. IMHO version ranges are an unnecessary implementation complexity.

When confronted with a version range specification, Moxie will resolve the highest version it can by consulting the maven-metadata.xml file. Moxie does not consult the entire dependency graph during version range resolution. This is a gross-simplification of the Maven version range feature.

Moxie Root Directory

By default, Moxie stores it's retrieved artifacts and metadata in ${user.home}/.moxie.

The directory structure takes design elements from both Maven and Gradle. Despite my preference for Gradle's groupId directory structure (org.apache.ant/ant/1.8.4), the Maven 2 directory structure was adopted (org/apache/ant/ant/1.8.4) because it allows direct http or ftp serving of those folders to a Maven 2-compatible client. This is exploited by Moxie Proxy, which can serve any Moxie root directory.

A typical Moxie root directory structure may look something like the following:


directory where Moxie stores Moxie metadata about an artifact: it's origin, record keeping dates, solved transitive dependencies, etc
directory where artifacts you build are installed based on their release status
directory where artifacts are copied to when using the COPY Maven cache strategy to re-use ${user.home}/.m2/repository artifacts
directory where Lucene indexes are maintained, per-registered repository
only applies to Moxie Proxy
directory where retrieved artifacts and standard Maven metadata files are stored, per-repository

Reference links