Kotlin-BOM dependency declaration breaks Maven
ldeluigi opened this issue · 2 comments
ldeluigi commented
More information
Guide to Gradle BOM management:
https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import
Reproduce the error
Maven minimal pom.xml example:
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<dependencies>
<dependency>
<groupId>it.unibo.tuprolog</groupId>
<artifactId>repl-jvm</artifactId>
<version>0.31.1-dev02+0cd8a1ae6</version>
</dependency>
</dependencies>
</project>
The error:
Could not resolve dependencies for project com.mycompany.app:my-app:jar:1: The following artifacts could not be resolved: org.jetbrains.kotlin:kotlin-bom:jar:1.8.10 (absent): org.jetbrains.kotlin:kotlin-bom:jar:1.8.10 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
Maven expects to find a <type>bom</type>
for bom dependencies.
ldeluigi commented
Monkeypatch:
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<parent>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-bom</artifactId>
<version>1.8.10</version>
</parent>
<dependencies>
<dependency>
<groupId>it.unibo.tuprolog</groupId>
<artifactId>repl-jvm</artifactId>
<version>0.31.1-dev02+0cd8a1ae6</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-bom</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
gciatto commented
This problem should be solved since version 0.31.8