diff options
Diffstat (limited to 'runners/maven-plugin/src/main/kotlin/DokkaMojo.kt')
-rw-r--r-- | runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index 89928b4c..b03d2811 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -12,6 +12,7 @@ import org.apache.maven.project.MavenProjectHelper import org.apache.maven.repository.internal.MavenRepositorySystemUtils import org.codehaus.plexus.archiver.Archiver import org.codehaus.plexus.archiver.jar.JarArchiver +import org.codehaus.plexus.util.xml.Xpp3Dom import org.eclipse.aether.DefaultRepositorySystemSession import org.eclipse.aether.RepositorySystem import org.eclipse.aether.RepositorySystemSession @@ -224,6 +225,16 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc val logger = MavenDokkaLogger(log) + val pluginsConfiguration = + (mavenProject?.getPlugin("org.jetbrains.dokka:dokka-maven-plugin")?.configuration as? Xpp3Dom) + ?.getChild("pluginsConfiguration")?.children?.map { + PluginConfigurationImpl( + it.name, + DokkaConfiguration.SerializationFormat.XML, + it.toString() + ) + }.orEmpty() + val configuration = DokkaConfigurationImpl( moduleName = moduleName, outputDir = File(getOutDir()), @@ -233,9 +244,9 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc pluginsClasspath = getArtifactByAether("org.jetbrains.dokka", "dokka-base", dokkaVersion) + dokkaPlugins.map { getArtifactByAether(it.groupId, it.artifactId, it.version ?: dokkaVersion) } .flatten(), - pluginsConfiguration = mutableMapOf(), //TODO implement as it is in Gradle + pluginsConfiguration = pluginsConfiguration.toMutableList(), modules = emptyList(), - failOnWarning = failOnWarning + failOnWarning = failOnWarning, ) val gen = DokkaGenerator(configuration, logger) |