api / org.gradle.api.artifacts.maven / PomFilterContainer / setPom

setPom

abstract fun setPom(defaultPom: MavenPom): Unit

Sets the default POM to be used. This POM is active if no custom filters have been added (see #addFilter(String, org.gradle.api.artifacts.maven.PublishFilter)). If at least one custom filter has been added the default POM is not used any longer.

Usually you don't need to set this property as the default value provides you a POM object you might use for configuration. By default the properties of such a POM object are all null. If they are null, Gradle will use default values for generating the Maven POM. Those default values are derived from the deployable artifact and from the project type (e.g. java, war, ...). If you explicitly set a POM property, Gradle will use this instead.