Introducing Schmant
Schmant is a tool for building software artifacts. It provides a runtime environment and a set of tools (tasks) for your build scripts.
Build scripts are written in any of the four supported scripting languages; Groovy, JavaScript, JRuby and Jython. The runtime environment gives the scripts access to all Java classes, EntityFS classes and any number of user-supplied classes too, so build scripts can be made as simple or complex as they need to be.
This simple example is borrowed from User's guide. It shows how Java classes are compiled and then bundled in a Jar file.
As the example above shows, Schmant includes the EntityFS APIs and utilities for working with files and directories.
Interpreted arguments
The
source
and target
properties of tasks that support
them, for instance, accept Object
arguments. The task tries to
interpret an untyped argument as something useful (often using the
ArgumentInterpreter
class). This gives the build scripts great flexibility in what kinds of arguments they can
throw at the tasks. The first example above used plain Java File
arguments, and the
second example used Schmant's
DirectoryAndFilter.
All available tasks bundled with Schmant are listed in the Task factory reference (The user's guide explains the difference between tasks and task factories.) In addition to the tasks bundled with Schmant, there are also tasks in separate task packages.
Task executors
Instead of running the tasks when they are defined, a Schmant script may choose to use one or several task executors for distributing the workload over several execution threads. This can often drastically reduce the time required for builds, but it introduces the need to handle dependencies between related tasks.
Project repositories
Schmant comes with tools for working with project repositories. A project repository contains a collection of projects. This can be an Eclipse workspace with java projects. The JavaWorkspaceBuilderTF task can be used for building projects in a project repository. There are also tools for resolving dependencies between projects and for filtering projects by, for instance, type or name.
Migration from Ant
To assist those daring enough to migrate away from Apache Ant, Schmant comes with the AntTF task. It can run whole Ant scripts or single Ant tasks.
Further reading
The next stop on the road to Schmant enlightenment is the User's guide.