by, 10-30-2011 at 05:48 PM (727 Views)
In Maven, projects can share dependencies which means that different project can use common jar files.
These jar files will be updated over time and Maven keeps each project current with the latest jar file. These jar files will be placed in a repository on a remote server and are accessed by the projects. These files will be mirrored in a local repository under the Maven installation. The remote repository location is given in the driver.properties file which is located in your Maven installation's bin sub directory. A property called maven.repo.remote takes a comma-separated list of URLs.
You may setup your repository by putting copies of internal jar files, private builds of open source projects, and other resources you might need.
Maven provides a repository element which is used in the project.xml to refer to the source control repository your project uses for storing its source.
For building a project, prepare project.xml and maven.xml files for your project. Once done, run Maven from the command line from the directory that contains these files. Now Maven will start downloading the required jar files in to your local repository. It will create a target directory for storing its output. Maven uses javac to compile the source directory's contents to a sub directory called classes under the target directory. Once done, it will start executing the unit tests configured in project.xml. On successful execution of the tests, it will create a jar file with the project's name and version in the target directory.
Documentation the project
Maven also provides support for creating documentation for your project. Run the following:
On running this, Maven will create a sub directory called docs under target. This will contain all the documentation generated. Open index.html and browse through. All the project information like: javadocs, unit-test information, source code cross referencing, a coding style check, metrics will be included in the web site generated.
Maven uses XDoc plug-in(maven/plugins/maven-xdoc-plugin-1.1/) for generating the website. If you wish to modify the look and feel, feel free to modify the CSS, images, and XML templates.