Getting Started

Moxie does not use Maven's pom.xml nor Ivy's ixy.xml to describe your project. Moxie uses the build.moxie project descriptor. This file employs a key:value format which is very similar to YAML.

Minimal build.moxie

Like Maven, Moxie supports convention-over-configuration so that the minimal build.moxie project descriptor can be defined as shown. This example assumes that your project uses the Apache Standard Directory Layout.
groupId: 'org.example'
artifactId: 'demo'
version: '1.2.3-SNAPSHOT'
minimal Moxie project descriptor

A realistic build.moxie

Minimal examples are cute, but they are not very realistic except for the simplest of projects. Here is a more complete example.

Moxie borrows ideas from both Maven and Gradle so anyone familiar with those tools should feel fairly comfortable with the build.moxie descriptor.

For more information on the build.moxie descriptor please review the build.moxie documentation.
# string quoting is optional.
# it is used here to improve syntax highlighting
name: 'Example 1'
description: 'A better example'
groupId: 'org.example'
artifactId: 'demo'
version: '1.2.3-SNAPSHOT'
organization: 'Example Writers'
url: ''
apply: 'eclipse', 'intellij', 'pom'
- compile 'src/main/java'
- test 'src/test/java'
- compile 'src/main/resources'
- test 'src/test/resources'
properties: {
  clang.version : 3.1
- compile 'org.apache.commons:commons-lang3:${clang.version}'
- test 'junit'
- build 'jacoco'
a more elaborate Moxie project descriptor

Ant build.xml

Moxie turbo-charges Ant and allows you to build your artifacts with easier to read build scripts. This example script uses Moxie Extension tasks with automatic property defaults based on the build.moxie descriptor.

<?xml version="1.0" encoding="UTF-8"?>
<project default="main" xmlns:mx="antlib:org.moxie">

    <!-- Moxie tasks -->
    <taskdef uri="antlib:org.moxie">
        <classpath location="${basedir}/moxie.jar" />

    <target name="main">
        <!-- Setup Ant build properties, resolve, & retrieve dependencies -->
        <mx:init />
        <!-- Compile your project -->
        <mx:javac />
        <!-- Compile your unit tests and execute them -->
        <mx:test />
        <!-- Generate class and source jars of your project -->
        <mx:package />
        <!-- Install your generated artifacts to your local Moxie cache -->
        <mx:install />