Package org.gradle.api.artifacts.maven

## Interface MavenPom

-     @Deprecated
      public interface MavenPom

  Deprecated.
  Is used for generating a Maven POM file and customizing the generation. To learn about the Maven POM see: http://maven.apache.org/pom.html

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `POM_FILE_ENCODING` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getArtifactId()` | Deprecated. Returns the artifact id for this POM.
    `ConfigurationContainer` | `getConfigurations()` | Deprecated. Returns the configuration container used for mapping configurations to Maven scopes.
    `java.util.List<?>` | `getDependencies()` | Deprecated. Returns the dependencies for this POM.
    `MavenPom` | `getEffectivePom()` | Deprecated. Returns a POM with the generated dependencies and the `whenConfigured(org.gradle.api.Action)` actions applied.
    `java.lang.String` | `getGroupId()` | Deprecated. Returns the group id for this POM.
    `java.lang.Object` | `getModel()` | Deprecated. Returns the underlying native Maven org.apache.maven.model.Model object.
    `java.lang.String` | `getPackaging()` | Deprecated. Returns the packaging for this POM.
    `Conf2ScopeMappingContainer` | `getScopeMappings()` | Deprecated. Returns the scope mappings used for generating this POM.
    `java.lang.String` | `getVersion()` | Deprecated. Returns the version for this POM.
    `MavenPom` | `project​(Closure pom)` | Deprecated. Provides a builder for the Maven POM for adding or modifying properties of the Maven `getModel()`.
    `MavenPom` | `project​(Action<? super GroovyObject> pom)` | Deprecated. Provides a builder for the Maven POM for adding or modifying properties of the Maven `getModel()`.
    `MavenPom` | `setArtifactId​(java.lang.String artifactId)` | Deprecated. Sets the artifact id for this POM.
    `MavenPom` | `setConfigurations​(ConfigurationContainer configurations)` | Deprecated. Sets the configuration container used for mapping configurations to Maven scopes.
    `MavenPom` | `setDependencies​(java.util.List<?> dependencies)` | Deprecated. Sets the dependencies for this POM.
    `MavenPom` | `setGroupId​(java.lang.String groupId)` | Deprecated. Sets the group id for this POM.
    `MavenPom` | `setModel​(java.lang.Object model)` | Deprecated. Sets the underlying native Maven org.apache.maven.model.Model object.
    `MavenPom` | `setPackaging​(java.lang.String packaging)` | Deprecated. Sets the packaging for this POM.
    `MavenPom` | `setVersion​(java.lang.String version)` | Deprecated. Sets the version for this POM.
    `MavenPom` | `whenConfigured​(Closure closure)` | Deprecated. Adds a closure to be called when the POM has been configured.
    `MavenPom` | `whenConfigured​(Action<MavenPom> action)` | Deprecated. Adds an action to be called when the POM has been configured.
    `MavenPom` | `withXml​(Closure closure)` | Deprecated. Adds a closure to be called when the POM XML has been created.
    `MavenPom` | `withXml​(Action<XmlProvider> action)` | Deprecated. Adds an action to be called when the POM XML has been created.
    `MavenPom` | `writeTo​(java.io.Writer writer)` | Deprecated. Writes the `getEffectivePom()` XML to a writer while applying the `withXml(org.gradle.api.Action)` actions.
    `MavenPom` | `writeTo​(java.lang.Object path)` | Deprecated. Writes the `getEffectivePom()` XML to a file while applying the `withXml(org.gradle.api.Action)` actions.

- - ### Field Detail

    - #### POM_FILE_ENCODING

          static final java.lang.String POM_FILE_ENCODING

      Deprecated.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getScopeMappings

          Conf2ScopeMappingContainer getScopeMappings()

      Deprecated.
      Returns the scope mappings used for generating this POM.

    - #### project

          MavenPom project​(Closure pom)

      Deprecated.
      Provides a builder for the Maven POM for adding or modifying properties of the Maven `getModel()`. The syntax is exactly the same as used by polyglot Maven. For example:

           pom.project {
              inceptionYear '2008'
              licenses {
                 license {
                    name 'The Apache Software License, Version 2.0'
                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    distribution 'repo'
                 }
              }
           }

      Returns:
        this

    - #### project

          MavenPom project​(Action<? super GroovyObject> pom)

      Deprecated.
      Provides a builder for the Maven POM for adding or modifying properties of the Maven `getModel()`. The syntax is exactly the same as used by polyglot Maven. For example:

           pom.project {
              inceptionYear '2008'
              licenses {
                 license {
                    name 'The Apache Software License, Version 2.0'
                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    distribution 'repo'
                 }
              }
           }

      Returns:
        this
      Since:
        4.2

    - #### getGroupId

          java.lang.String getGroupId()

      Deprecated.
      Returns the group id for this POM.
      See Also:
        `Model.setGroupId(String)`

    - #### setGroupId

          MavenPom setGroupId​(java.lang.String groupId)

      Deprecated.
      Sets the group id for this POM.
      Returns:
        this
      See Also:
        `Model.getGroupId()`

    - #### getArtifactId

          java.lang.String getArtifactId()

      Deprecated.
      Returns the artifact id for this POM.
      See Also:
        `Model.getArtifactId()`

    - #### setArtifactId

          MavenPom setArtifactId​(java.lang.String artifactId)

      Deprecated.
      Sets the artifact id for this POM.
      Returns:
        this
      See Also:
        `Model.setArtifactId(String)`

    - #### getVersion

          java.lang.String getVersion()

      Deprecated.
      Returns the version for this POM.
      See Also:
        `Model.getVersion()`

    - #### setVersion

          MavenPom setVersion​(java.lang.String version)

      Deprecated.
      Sets the version for this POM.
      Returns:
        this
      See Also:
        `Model.setVersion(String)`

    - #### getPackaging

          java.lang.String getPackaging()

      Deprecated.
      Returns the packaging for this POM.
      See Also:
        `Model.getPackaging()`

    - #### setPackaging

          MavenPom setPackaging​(java.lang.String packaging)

      Deprecated.
      Sets the packaging for this POM.
      Returns:
        this
      See Also:
        `Model.setPackaging(String)`

    - #### setDependencies

          MavenPom setDependencies​(java.util.List<?> dependencies)

      Deprecated.
      Sets the dependencies for this POM.
      Returns:
        this
      See Also:
        `ModelBase.setDependencies(java.util.List)`

    - #### getDependencies

          java.util.List<?> getDependencies()

      Deprecated.
      Returns the dependencies for this POM.
      See Also:
        `ModelBase.getDependencies()`

    - #### getModel

          java.lang.Object getModel()

      Deprecated.
      Returns the underlying native Maven org.apache.maven.model.Model object. The MavenPom object delegates all the configuration information to this object. There Gradle MavenPom objects provides delegation methods just for setting the groupId, artifactId, version and packaging. For all other elements, either use the model object or `project(groovy.lang.Closure)`.
      Returns:
        the underlying native Maven object

    - #### setModel

          MavenPom setModel​(java.lang.Object model)

      Deprecated.
      Sets the underlying native Maven org.apache.maven.model.Model object.
      Returns:
        this
      See Also:
        `getModel()`

    - #### writeTo

          MavenPom writeTo​(java.io.Writer writer)

      Deprecated.
      Writes the `getEffectivePom()` XML to a writer while applying the `withXml(org.gradle.api.Action)` actions. Closes the supplied Writer when finished.
      Parameters:
        `writer` - The writer to write the POM to.
      Returns:
        this

    - #### writeTo

          MavenPom writeTo​(java.lang.Object path)

      Deprecated.
      Writes the `getEffectivePom()` XML to a file while applying the `withXml(org.gradle.api.Action)` actions. The path is resolved as defined by `Project.files(Object...)` The file will be encoded as UTF-8.
      Parameters:
        `path` - The path of the file to write the POM into.
      Returns:
        this

    - #### whenConfigured

          MavenPom whenConfigured​(Closure closure)

      Deprecated.

      Adds a closure to be called when the POM has been configured. The POM is passed to the closure as a parameter.

      Parameters:
        `closure` - The closure to execute when the POM has been configured.
      Returns:
        this

    - #### whenConfigured

          MavenPom whenConfigured​(Action<MavenPom> action)

      Deprecated.

      Adds an action to be called when the POM has been configured. The POM is passed to the action as a parameter.

      Parameters:
        `action` - The action to execute when the POM has been configured.
      Returns:
        this

    - #### withXml

          MavenPom withXml​(Closure closure)

      Deprecated.

      Adds a closure to be called when the POM XML has been created. The XML is passed to the closure as a parameter in form of a `XmlProvider`. The action can modify the XML.

      Parameters:
        `closure` - The closure to execute when the POM XML has been created.
      Returns:
        this

    - #### withXml

          MavenPom withXml​(Action<XmlProvider> action)

      Deprecated.

      Adds an action to be called when the POM XML has been created. The XML is passed to the action as a parameter in form of a `XmlProvider`. The action can modify the XML.

      Parameters:
        `action` - The action to execute when the POM XML has been created.
      Returns:
        this

    - #### getConfigurations

          ConfigurationContainer getConfigurations()

      Deprecated.
      Returns the configuration container used for mapping configurations to Maven scopes.

    - #### setConfigurations

          MavenPom setConfigurations​(ConfigurationContainer configurations)

      Deprecated.
      Sets the configuration container used for mapping configurations to Maven scopes.
      Returns:
        this

    - #### getEffectivePom

          MavenPom getEffectivePom()

      Deprecated.
      Returns a POM with the generated dependencies and the `whenConfigured(org.gradle.api.Action)` actions applied.
      Returns:
        the effective POM