Build steps for Maven project in TeamCity
In this topic, you will learn how to set up a build steps for maven project in TeamCity.
As shown in below image, you have to select runner type as Maven. Then you have to provide the goals to be executed. By default, it uses POM.xml in the root directory of the project. You may also run code coverage process along with test goal which gives report on how many classes were covered by tests.
Here is the list of some of the popular maven goals that can be used.
- test – execute tests using surefire plugin. We can also pass various parameters to maven JUnit test goal and maven testNG test goal
- verify – executes unit tests as well as does verification provided by plugins
Below image shows that sample build log.