java-frameworks003002.gif
Java Frameworks Integration
Home
SpringFramework
Hibernate
Tapestry
Maven
java-frameworks003001.gif
Wiki
Maven (Part 1).
 
Introduction.
Maven is a framework which help you to build your application. Once your application is builded you can deploy it in a company repository. Many open source projects are published in a central repository. The most well known repository is http://repo1.maven.org where you can find many projects such as apache, spring, hibernate...
 
Main Concepts.
For an easy way to use Maven it is recommanded to structure your java project in a certain way but, of course, you can still use you own. If derogate from the recommanded structure, you will have to setup much more your maven tool.
 
Each Maven project contains an xml called 'pom'. This xml describes the dependencies of your project, where to find these dependencies and how to build your project. The xml can contains much more but for more information please refer to the Maven project it self.
 

Maven generates for each project only one artitifact, the type of artifact is defined in your pom, it could be a jar, war, ear... By using the 'assembly' plugin it is possible to generate mor artifact, but this should be used with caution.
 
As just mentioned, the pom.xml defines the dependencies of your project, but the dependencies are transitive. That's mean if your project A depends on B and B on C, you have only to declare in the pom of A the dependency B. The dependency C will be automatically imported in your project.