--- Maven --- Andrés Gómez Casanova --- 2010-06-09 ---
Maven
Maven is user for the project management. It helps the developers to compile, test, build and install the sources. In the application it is changed constantly, because it manages the dependencies, and new options are always added.
Profiles
Maven uses profiles for specific tasks, in the application we have these:
- release: This profile compiles the project and test everything, to finally generate a binary file that could be deployed for the community. This is mostly used when the application will be release for a stable version (Major: from 1.6 to 2.0, or minor: from 1.4 to 1.5)
- release-site: Once the application is release, the reports could be executed to measure the different criteria. Once the site is created, it could be deployed in the Page Web.
Build
For the build phase there are several plugins:
- resources: Copies the sources in a predefined encoding.
- compile: Compiles the sources.
- surefire: Executes the tests.
- jar: Creates the jar file. Defines elements for the Manifest.
- tools: Verifies and copy the legal files, it means the COPYING.txt and other files.
- changes: Validates if the changes.xml file is valid. This file contains the description of the code modifications.
- doap: generates the doap file which is useful for describing Open Source projects.
Reports - Site
- checkstyle: Checks the source code against a set of rules for good programming.
- javadoc: Generates the javadoc documentation.
- jxr: Generates a set of web pages containing the source code.
- pmd: Checks the source code against a a set of rules of bad practices.
- project-info-report: Generates a set of web pages that describe the project and other basic components.
- surefire: Creates the tests result.
- surefire-report: Creates a set of web pages from the tests result.
- cobertura: Check how much lines of the code have been tested.
- jdepend: Calculates the dependency of the application's components.
- changes: Creates a report from the file that describe the application's changes. Eventually, it sends a mail to the mailing-list.
- findbugs: Checks the compile code against a set of rules.
- changelog: Creates reports with the changes of each file, and done for each developer.
- taglist: Generates a report of the TODO and FIXME tokens in the code.
- doap: Prepares the doap file for the Web Site.
- dashboard: Calculates the difference between the current deployment and the last one.
- site: Creates the web site.
- javancss: Creates a report of different criteria for writing code.
Problems
- OutOfMemory: set this environment variable to: MAVEN_OPTS="-Xms256m -Xmx1620m"