Specifies the relative path from the repository root to the Maven POM file.
goals - Goal(s) string. Default value: package.
options - Options string.
publishJUnitResults - Publish to Azure Pipelines boolean. Default value: true.
Specifies the option to publish the JUnit test results produced by the Maven build to Azure Pipelines. Each test results file matching Test Results Files will be published as a test run in Azure Pipelines.
publishJUnitResults - Publish to Azure Pipelines/TFS boolean. Default value: true.
Specifies the option to publish the JUnit test results produced by the Maven build to Azure Pipelines/TFS. Each test results file matching Test Results Files will be published as a test run in Azure Pipelines/TFS.
testResultsFiles - Test results files string. Required when publishJUnitResults = true. Default value: **/TEST-*.xml.
Specifies the path and pattern of test results files to publish. Wildcards can be used. More information about file matching patterns.
For example, **/TEST-*.xml for all XML files whose name starts with TEST-.
If no root path is specified, files are matched beneath the default working directory, the value of which is available in the variable $(System.DefaultWorkingDirectory). For example, a value of **/TEST-*.xml will actually result in matching files from $(System.DefaultWorkingDirectory)/**/TEST-*.xml.
testRunTitle - Test run title string. Optional. Use when publishJUnitResults = true.
Specifies a name for the test run.
allowBrokenSymlinks - Allow broken symbolic links
Input alias: allowBrokenSymbolicLinks. boolean. Optional. Use when publishJUnitResults = true. Default value: true.
When set to false, fails the build when the task finds a broken symbolic link while publishing tests result.
codeCoverageClassFilter - Class inclusion/exclusion filters
Input alias: classFilter. string. Optional. Use when codeCoverageTool != None.
Specifies a comma-separated list of filters to include or exclude classes from collecting code coverage. For example, +:com.*,+:org.*,-:my.app*.*.
codeCoverageClassFilesDirectories - Class files directories
Input alias: classFilesDirectories. string. Optional. Use when codeCoverageTool = JaCoCo.
This field is required for a multi-module project.
Specifies a comma-separated list of relative paths from the Maven POM file to directories containing class files and archive files (JAR, WAR, etc.). Code coverage is reported for class files in these directories. For example, target/classes,target/testClasses.
codeCoverageSourceDirectories - Source files directories
Input alias: srcDirectories. string. Optional. Use when codeCoverageTool = JaCoCo.
This field is required for a multi-module project.
Specifies a comma-separated list of relative paths from the Maven POM file to source code directories. Code coverage reports use these to highlight source code. For example, src/java,src/Test.
codeCoverageFailIfEmpty - Fail when code coverage results are missing
Input alias: failIfCoverageEmpty. boolean. Optional. Use when codeCoverageTool != None. Default value: false.
Fails the build if code coverage did not produce any results to publish.
codeCoverageRestoreOriginalPomXml - Restore original pom.xml after task execution
Input alias: restoreOriginalPomXml. boolean. Optional. Use when codeCoverageTool != None. Default value: false.
Code coverage modifies pom.xml to produce results. Use this option if you need to keep the original pom.xml.
javaHomeOption - Set JAVA_HOME by
Input alias: javaHomeSelection. string. Required. Allowed values: JDKVersion (JDK Version), Path. Default value: JDKVersion.
Sets JAVA_HOME either by selecting a JDK version that will be discovered during builds or by manually entering a JDK path.
jdkVersionOption - JDK version
Input alias: jdkVersion. string. Optional. Use when javaHomeSelection = JDKVersion. Allowed values: default, 1.21 (JDK 21), 1.17 (JDK 17), 1.11 (JDK 11), 1.10 (JDK 10 (out of support)), 1.9 (JDK 9 (out of support)), 1.8 (JDK 8), 1.7 (JDK 7), 1.6 (JDK 6 (out of support)). Default value: default.
Attempts to discover the path to the selected JDK version and sets JAVA_HOME accordingly.
jdkVersionOption - JDK version
Input alias: jdkVersion. string. Optional. Use when javaHomeSelection = JDKVersion. Allowed values: default, 1.17 (JDK 17), 1.11 (JDK 11), 1.10 (JDK 10 (out of support)), 1.9 (JDK 9 (out of support)), 1.8 (JDK 8), 1.7 (JDK 7), 1.6 (JDK 6 (out of support)). Default value: default.
Attempts to discover the path to the selected JDK version and sets JAVA_HOME accordingly.
jdkVersionOption - JDK version
Input alias: jdkVersion. string. Optional. Use when javaHomeSelection = JDKVersion. Allowed values: default, 1.11 (JDK 11), 1.10 (JDK 10 (out of support)), 1.9 (JDK 9 (out of support)), 1.8 (JDK 8), 1.7 (JDK 7), 1.6 (JDK 6 (out of support)). Default value: default.
Attempts to discover the path to the selected JDK version and sets JAVA_HOME accordingly.
Specifies the custom path to the Maven installation (for example: /usr/share/maven).
mavenSetM2Home - Set M2_HOME variable boolean. Optional. Use when mavenVersionSelection = Path. Default value: false.
Sets the M2_HOME variable to a custom Maven installation path.
mavenOptions - Set MAVEN_OPTS to
Input alias: mavenOpts. string. Default value: -Xmx1024m.
Sets the MAVEN_OPTS environment variable, which is used to send command-line arguments to start the JVM. The -Xmx flag specifies the maximum memory available to the JVM.
Automatically authenticates with Azure Artifacts feeds. If Artifacts feeds are not in use, deselect this option for faster builds.
sonarQubeRunAnalysis - Run SonarQube or SonarCloud analysis
Input alias: sqAnalysisEnabled. boolean. Default value: false.
This option has changed from using version 1 of the Maven task to using the SonarQube and SonarCloud marketplace extensions.
Enable this option to run SonarQube or SonarCloud analysis after executing goals in the Goals field. The install or package goal should run first. Before this Maven task, you must also add a Prepare Analysis Configuration task from one of the extensions to the build pipeline.
isJacocoCoverageReportXML - Use XML Jacoco reports for SonarQube analysis boolean. Optional. Use when sqAnalysisEnabled = true && codeCoverageTool = JaCoCo. Default value: false.
Uses XML Jacoco reports for SonarQube analysis. Learn more about test reports.
sqMavenPluginVersionChoice - SonarQube scanner for Maven version string. Required when sqAnalysisEnabled = true. Allowed values: latest (Use latest release), pom (Use version declared in your pom.xml). Default value: latest.
Specifies the SonarQube Maven plugin version to use. You can use the latest version or rely on the version in your pom.xml.
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.