Started logging the pom settings
This helps debugging problems and understanding what's going on
@@ -2,11 +2,15 @@ package org.mockito.release.internal.gradle.pom
import groovy.transform.PackageScope
import org.gradle.api.Project
+import org.gradle.api.logging.Logger
+import org.gradle.api.logging.Logging
import org.gradle.api.publish.maven.MavenPublication
@PackageScope
class PomCustomizer {
+ private static final Logger LOG = Logging.getLogger(PomCustomizer)
+
/**
* Documentation for this method needs to be kept in {@link org.mockito.release.gradle.PomPlugin}
*/
@@ -14,6 +18,13 @@ class PomCustomizer {
//TODO accessing 'ext' properties needs to be 'safe' and fail if the user have not provided stuff
//TODO relies on ext properties set on the root project. Seems not right
publication.pom.withXml {
+ LOG.lifecycle(""" Customizing pom for publication '$publication.name' in project '$project.path'
+ - Module name (project.archivesBaseName): $project.archivesBaseName
+ - Description (project.description): $project.description
+ - GitHub repository (project.rootProject.ext.gh_repository): $project.rootProject.ext.gh_repository
+ - Developers (project.rootProject.ext.pom_developers): ${project.rootProject.ext.pom_developers.join(', ')}
+ - Contributors (project.rootProject.ext.pom_contributors): ${project.rootProject.ext.pom_contributors.join(', ')}""")
+
def root = asNode()
def rootProject = project.rootProject
