Build: Maven

VSTS | TFS 2018 | TFS 2017 | TFS 2015

Build: Maven to build your Java code.


The build agent must have the following capability:

  • Maven


Argument Description
Maven POM file

Relative path from the repo root to the Maven POM .xml file.

See Introduction to the POM.

Options Specify any Maven options you want to use.

In most cases, set this to package to compile your code and package it into a .war file. If you leave this argument blank, the build will fail.

See Introduction to the Maven build lifecycle.

JUnit Test Results
Publish to VSTS/TFS Select this option to publish JUnit Test results produced by the Maven build to VSTS/TFS.
Test Results Files Test results files path. Wildcards can be used. For example, **/TEST-*.xml for all xml files whose name starts with TEST-."
JDK Version Will attempt to discover the path to the selected JDK version and set JAVA_HOME accordingly.
JDK Architecture Optionally supply the architecture (x86, x64) of JDK.
Code Analysis
Run SonarQube Analysis Select if you want to run a SonarQube analysis. See The Maven build task now simplifies SonarQube analysis.
Run PMD Analysis Select if you want to perform a PMD static analysis. A build result page for each .pom file is shown on the Artifacts tab of the completed build. See The Maven build task now supports PMD analysis out of the box.
Control options


Build and Deploy your Java application to an Azure web app


Do I need an agent?

You need at least one agent to run your build or release. Get an agent.

I can't select a default agent queue and I can't queue my build or release. How do I fix this?

See Agent pools and queues.

I use TFS on-premises and I don't see some of these features. Why not?

Some of these features are available only on VSTS and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.