JAM adopted two of Maven's best features: the POM (Project Object Model) and the Maven repository. Maven's POM serves as a high level project descriptor containing sufficient dependency information to automate much of the classpath and packaging drudgery. Maven's repository handles versioning, library sharing and automatic download of open source libraries - if a library dependency is not found in the local repository, Maven tries to download it from its central repository at: http://ibiblio.org/maven.
JAM and Maven compliment each other. JAMs primary focus is on development and testing. Maven posses exceptional project documentation capabilities, which JAM does not attempt to duplicate. JAM is a pure Ant build framework with the advantage of being widely supported and understood. Maven is based on Jelly, a flexible scripting language with capabilities far beyond Ant's, but with the added cost of learning a new language.
Pick the tool that fits your skill level and project requienments. JAM can also serve as a gentle way to get aquanted with Maven's capabilities.
To call Maven from JAM import the maven.xml module. Examples and documentation
can be found at the top of that file.
TODO
Although JAM was designed to compliment Maven, you may need to do a little tweaking to get
the two tools to work together. Many of Maven's plugins do not support all the capabilities of the
Ant tasks they build upon. For example, none of the plugins allow you to specify multiple source
directories. The fix in this case is to define a pregoal that combines the two source directories
into a temporary directory, say src-temp, and point Maven at that directory.
There are many options for configuring Maven, see the Maven User Guide).
JAM supports all the properties declared in the POM, but currently few of the properties declared elsewhere
with the notable exception of maven.repo.local. Future versions may rectify this. Here is a short
list of how key Maven properties are defined in JAM:
| JAM Property | Maven Property |
|---|---|
| module.name | id |
| module.version | currentVersion |
| maven.groupId | groupId |
| maven.type | [implied by tool] |
| maven.repo | maven.repo.local |