anchor.diff:  
   Generated POMs can be found in `&lt;buildDir&gt;/poms`. They can be further customized via the link:{javadocPath}/org/gradle/api/artifacts/maven/MavenPom.html[MavenPom] API. For example, you might want the artifact deployed to the Maven repository to have a different version or name than the artifact generated by Gradle. To customize these you can do:
   
  -=== Example: Customization of pom
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/artifacts/maven/build.gradle[tag=customize-pom]
  -----
  +.Customization of pom
  +====
  +include::sample[dir="userguide/artifacts/maven",files="build.gradle[tags=customize-pom]"]
  +====
   
   To add additional content to the POM, the `pom.project` builder can be used. With this builder, any element listed in the http://maven.apache.org/pom.html[Maven POM reference] can be added.
   
  -=== Example: Builder style customization of pom
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/artifacts/maven/build.gradle[tag=builder]
  -----
  +.Builder style customization of pom
  +====
  +include::sample[dir="userguide/artifacts/maven",files="build.gradle[tags=builder]"]
  +====
   
   Note: `groupId`, `artifactId`, `version`, and `packaging` should always be set directly on the `pom` object.
   
  -=== Example: Modifying auto-generated content
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/maven/pomGeneration/build.gradle[tag=when-configured]
  -----
  +.Modifying auto-generated content
  +====
  +include::sample[dir="maven/pomGeneration",files="build.gradle[tags=when-configured]"]
  +====
   
   If you have more than one artifact to publish, things work a little bit differently. See <<#sub:multiple_artifacts_per_project,Multiple artifacts per project>>.
   
   To customize the settings for the Maven installer (see <<#sub:installing_to_the_local_repository,Installing to the local repository>>), you can do:
   
  -=== Example: Customization of Maven installer
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/artifacts/maven/build.gradle[tag=customize-installer]
  -----
  +.Customization of Maven installer
  +====
  +include::sample[dir="userguide/artifacts/maven",files="build.gradle[tags=customize-installer]"]
  +====
   
   
   [[sub:multiple_artifacts_per_project]]
  
positive.code: 
  The Maven plugin configures the default mapping between the Gradle configurations added by the Java and War plugin and the Maven scopes. Most of the time you don't need to touch this and you can safely skip this section. The mapping works like the following. You can map a configuration to one and only one scope. Different configurations can be mapped to one or different scopes. You can also assign a priority to a particular configuration-to-scope mapping. Have a look at link:{javadocPath}/org/gradle/api/artifacts/maven/Conf2ScopeMappingContainer.html[Conf2ScopeMappingContainer] to learn more. To access the mapping configuration you can say:
  
  === Example: Accessing a mapping configuration
  
  [source.multi-language-sample,groovy]
  .build.gradle
  ----
  include::{samplesPath}/userguide/artifacts/maven/build.gradle[tag=mappings]
  ----
  
  Gradle exclude rules are converted to Maven excludes if possible. Such a conversion is possible if in the Gradle exclude rule the group as well as the module name is specified (as Maven needs both in contrast to Ivy). Per-configuration excludes are also included in the Maven POM, if they are convertible.
  
negative.code: 
  To use the Maven plugin, include the following in your build script:
  
  .Using the Maven plugin
  ====
  include::sample[dir="maven/quickstart",files="build.gradle[tags=use-plugin]"]
  ====
  
  
  [[sec:maven_tasks]]
  