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 a 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 enter this goal on the Maven build runner settings page. Upon the execution of the chosen goals, TeamCity accurately tracks the build progress and renders unit test results on-the-fly in the Web UI. You can also get the advantage of using Inspections & Duplicates Runners on a Maven project and gather code coverage with the IntelliJ IDEA engine to perform sophisticated code analysis.
As TeamCity is able to connect to the Maven artifact repository, you can also manually set up a dependency trigger, which will start a build if a 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 is no need to rebuild everything and run all the tests every time there is 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 a specific local Maven repository within a 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 utilized in your company's projects (equivalent to the Maven command line option -s or ?settings). There's no need to place the same xml with settings under a version control for each and every project: just upload the file once to your 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.