What is happening? What should have happened instead?
Dokka 2.x fails with The version cannot be empty when a Maven dependencyManagement section contains an artifact entry without an explicit version, where the version is expected to be provided by an imported BOM (e.g. Spring Boot BOM). Maven resolves this correctly, but Dokka plugin does not.
Reproducer
Steps to Reproduce
- Import a BOM in dependencyManagement that manages jackson-module-jaxb-annotations:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.5.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
- Declare the same artifact in dependencyManagement without a version (relying on the BOM to provide it), but with an exclusion:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<!-- No version — expected to be provided by Spring Boot BOM -->
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
- Run Dokka:
mvn dokka:dokka
Builds fails with
[ERROR] Failed to execute goal org.jetbrains.dokka:dokka-maven-plugin:2.2.0:dokka
(default) on project ....: Execution default of goal
org.jetbrains.dokka:dokka-maven-plugin:2.2.0:dokka failed: For artifact
{com.fasterxml.jackson.module:jackson-module-jaxb-annotations:null:jar}:
The version cannot be empty. -> [Help 1]
Dokka version
2.2.0
Kotlin Gradle Plugin (KGP) version
No response
Android Gradle Plugin (AGP) version (if applicable)
No response
Build tool
Maven
Project type
Anything else? (optional)
This was working fine on 1.9 but breaks on both 2.1 and 2.2.
Currently have a workaround by adding following in pom (dependency with exclusion is on parent pom):
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.21.2</version>
</dependency>
</dependencies>
</dependencyManagement>
What is happening? What should have happened instead?
Dokka 2.x fails with
The version cannot be emptywhen a Maven dependencyManagement section contains an artifact entry without an explicit version, where the version is expected to be provided by an imported BOM (e.g. Spring Boot BOM). Maven resolves this correctly, but Dokka plugin does not.Reproducer
Steps to Reproduce
mvn dokka:dokkaBuilds fails with
Dokka version
2.2.0
Kotlin Gradle Plugin (KGP) version
No response
Android Gradle Plugin (AGP) version (if applicable)
No response
Build tool
Maven
Project type
Anything else? (optional)
This was working fine on 1.9 but breaks on both 2.1 and 2.2.
Currently have a workaround by adding following in pom (dependency with exclusion is on parent pom):