Moxie+Ant

Moxie+Ant is a distribution of Ant with Moxie.

This bundle provides a command-line executable (moxie) for all platforms supported by Ant. Using the moxie command instead of the ant command gives you some additional features.

Moxie Phases

Moxie+Ant automatically injects several phase targets at runtime which you may use to build your projects. These are similar to Maven's phases, but not nearly as sophisticated. They are suitable for building simple projects.

phase:init
validates project configuration, retrieves dependencies, and configures Ant properties
phase:compile
compile the source code of the project
phase:test
test the compiled source code using a unit testing framework. optionally generates code coverage reports.
phase:package
take the compiled code and package it in its distributable format, such as a JAR
phase:install
install the package into the local repository, for use as a dependency in other projects locally
phase:deploy
deploys the artifact into the local repository, for use as a dependency in other projects locally
phase:report
generates a dependency report to the console or to a text file
phase:clean
clean build and target folders
phase:release
prepares a new release and begins a new development cycle

Project Creation

Moxie+Ant has very primitive project creation support. This is a work-in-progress.

moxie -new -<archetype> <groupId>:<artifactId>:<version> -dir:<dirname> -git<:originId> -eclipse<:+var> -intellij

Archetypes

Git

Passing -git will initialize a git repository.

Specifying an originId will automatically setup a an origin remote. If you are using Gitblit and your account has create-on-push permission this is sufficient to create a local project and push it to Gitblit.

IDE parameters

-eclipse generates .project and .classpath files
-eclipse:+var generates .project and .classpath files that are relative to an Eclipse variable MX_ROOT which must be defined in your Eclipse IDE. This is useful to version-control the .classpath file since it does not have direct path links to your personal Moxie root folder.
-eclipse:+ext generates .project and .classpath files that are relative to the ext folder of your project.
-intellij generates .iml files