Maven : Java Glossary

Maven
Apache’s build tool. You use a standard directory layout rather than specifing commands to describe how to pull it all together. You use a generated XML (extensible Markup Language) POM (Project Object Model) file that describes your project, rather than how to build your project as you do in Ant. Maven is particularly good for EE (Enterprise Edition). Ant is very repetitive. Maven is a way of factoring out that repetitiveness. I used another technique for doing that before I had heard of Maven. I wrote a Java Stomp program to generate my Ant scripts.

You can see from this example Maven script contributed by Owen Jacobsen that, unlike ANT (A Neat Tool), you don’t get involved with the low level details of the various steps of compilation and bundling.

The <packaging> element, near the top, is enough to tell Maven how to build things, in most cases: <packaging>jar</packaging>, for example, causes src/main/java to be compiled, src/main/resources to be copied (and optionally filtered through a token-replacement layer), src/test/java to be compiled and run as test cases, then the resulting classes and files from src/main used to build a JAR. There are built-in packaging types for JARs, WAR (Web Archive) s, EAR (Enterprise Archive file) s, EJB-JARs, RARs (Roshal Archives) and some maven infrastructure types like pom. New packaging types (with associated standard build procedures) can be implemented as plugins — there are, for example, plugins for JBoss SAR (Service Archive) files, Flex applications and libraries, and a bunch of other things.

If you need to specify how to build something, you can add new plugins to the build (not shown in the example) or reconfigure the standard plugins to behave differently. There’s also an inheritance model, where projects can inherit settings.

Most of the information in pom.xml is actually not related to building the project at all: it’s metadata about the project.

Ant
Ivy
Maven Plugin List
Maven Repository: search engine for Maven-related material
XML

CMP homejump to top

available on the web at:

http://mindprod.com/jgloss/maven.html
  

optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\maven.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Blog
IP:[65.110.21.43]
Your face IP:[54.234.67.55]
You are visitor number 8,949.