Sample Files

build.moxie

name: 'My Project'
description: "My Project's description"
groupId: 'org.example'
artifactId: 'demo'
version: '1.2.3-SNAPSHOT'
organization: 'Example Writers'
url: 'http://demo.example.org'
apply: 'eclipse', 'intellij', 'pom'
sourceDirectories:
- compile 'src/main/java'
- test 'src/test/java'
resourceDirectories:
- compile 'src/main/resources'
- test 'src/test/resources'
dependencies:
- test 'junit'
- build 'jacoco'

build.xml

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

    <!--
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Retrieve Moxie Toolkit
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -->
    <property name="moxie.version" value="0.10.0" />
    <property name="moxie.url" value="https://gitblit-org.github.io/moxie/maven/" />
    <property name="moxie.jar" value="toolkit-${moxie.version}.jar" />
    <property name="moxie.dir" value="${user.home}/.moxie" />
	
    <mkdir dir="${moxie.dir}" />
    <get src="${moxie.url}/org/moxie/toolkit/${moxie.version}/${moxie.jar}"
        dest="${moxie.dir}" skipexisting="true" verbose="true" />

    <taskdef uri="antlib:org.moxie">
        <classpath location="${moxie.dir}/${moxie.jar}" />
    </taskdef>

    <!-- Main Target -->
    <target name="main" description="Prepares, compiles, tests, and packages your project">
		
        <!-- Setup Ant build properties and resolve & retrieve Maven dependencies -->
        <mx:init mxroot="${moxie.dir}" />
		
        <!-- 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 />
		
    </target>

</project>