Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.4k stars 399 forks source link

Maven doesn't recognize pluginsConfiguration element in the dokka-maven-plugin #3387

Open raviaw opened 9 months ago

raviaw commented 9 months ago

Maven doesn't recognize pluginsConfiguration element in the dokka-maven-plugin.

For this configuration:

      <plugin>
        <groupId>org.jetbrains.dokka</groupId>
        <artifactId>dokka-maven-plugin</artifactId>
        <!-- The version of this plugin is managed. -->
        <executions>
          <execution>
            <phase>pre-site</phase>
            <goals>
              <goal>dokka</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <reportUndocumented>false</reportUndocumented>
          <sourceDirectories>
            <dir>${project.basedir}/src</dir>
          </sourceDirectories>
          <dokkaPlugins>
            <plugin>
              <groupId>com.glureau</groupId>
              <artifactId>html-mermaid-dokka-plugin</artifactId>
              <version>0.4.5</version>
            </plugin>
          </dokkaPlugins>
          <includes>
            <include>src/main/dokka/Module.md</include>
          </includes>
          <!-- IntelliJ will complain about this, but this is valid -->
          <pluginsConfiguration>
            <org.jetbrains.dokka.base.DokkaBase>
              <footerMessage><![CDATA[Copyright Company]]></footerMessage>
            </org.jetbrains.dokka.base.DokkaBase>
          </pluginsConfiguration>
        </configuration>
      </plugin>

It shows this warning when building:

[WARNING] Parameter 'pluginsConfiguration' is unknown for plugin 'dokka-maven-plugin:1.8.20:dokka (default-cli)'

We are using dokka 1.8.20, Maven 3.9.6, Java 1.8:

[INFO] --- dokka:1.8.20:dokka (default-cli)

Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) Maven home: C:\dev\apache-maven-3.9.4 Java version: 1.8.0_381, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-1.8\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

This option should be added to the plugin configuration so that Maven recognizes it.

atyrin commented 7 months ago

Just in case: the settings passed to <pluginsConfiguration> are used by Dokka during documentation generation. But IJ is unable to recognize the relevant nodes in pom.xml, and the building process produces the warning.

Still the case for 1.9.20 (upcoming).