TeamCity keeps abreast of current development trends, and provides seamless out-of-the-box integration with Apache Maven 2 and 3, the build system of choice for many Java developers.
Maven-specific Build Configurations
Creating a Maven build configuration in TeamCity is a matter of few clicks: just provide an URL to your project POM file in any convenient form (http:, ftp:, file:, Maven SCM URL, etc.), the rest is done automatically. TeamCity will read the name and the VCS root URL parameters from the POM and, by default, keep TeamCity build number in sync with the Maven version number, unless you disable this synchronization later on.
Maven Build Runner
To run any specific Maven goal, simply write this goal down on a Maven build runner settings page.Upon the execution of the chosen goals, TeamCity accurately tracks build progress, and renders unit test results on-the-fly in the Web UI. You can also get advantage of using Inspections & Duplicates Runners on Maven project and gather code coverage with IntelliJ IDEA engine, to perform sophisticated code analysis.
As TeamCity is able to connect to the Maven artifact repository, you can also manually setup a dependency trigger, which would start a build if specified Maven artifact from the repository has changed. TeamCity can also trigger a build whenever a SNAPSHOT dependency artifact is updated without configuring a separate trigger for each dependency.
Dependency-based Test Run — Faster Builds
Get faster test results by building incrementally. TeamCity knows how your Maven modules are interconnected by dependencies and which of them are affected by a change (directly or transitively): there's no need to rebuild everything and run all the tests every time there's a change, only parts affected by the change are rebuilt and tested.
One of the best practices in software design is to make modules as independent as possible, and if you follow this practice, you get faster builds!
In TeamCity you can force using specific local Maven repository within particular build configuration which allows you to isolate artifacts produced by this configuration from other local repositories.
Global Maven Settings
TeamCity allows you to easily unify Maven user settings used in your company's projects (equivalent to Maven command line option -s or ?settings). There's no need to place the same xml with settings under version control for each and every project: just upload it once on TeamCity server, and it'll be available wherever you need it! Moreover, it makes it easier to maintain company-wide settings: you can modify the settings file stored on TeamCity, and it'll be updated for all the projects where it's used.