Not sure how to fix this.
I want this version of the Kotlin runtime and maven plugin.
These are the bits in my pom.xml:
<dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-runtime</artifactId> <version>1.2-M2</version> </dependency> <build> <plugins> <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-plugin</artifactId> <version>1.2-M2</version> <executions>
And I added this as a repo:
<repository> <snapshots> <enabled>false</enabled> </snapshots> <id>kotlin-bintray</id> <name>Kotlin Bintray</name> <url>http://dl.bintray.com/kotlin/kotlin-dev/</url> </repository>
I get this error:
Failure to find org.jetbrains.kotlin:kotlin-maven-plugin:jar:1.2-M2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
But I don’t see anything that might be wrong.
By the way, notice that the runtime jar is found, so the repository section must be correct since this repository is where maven finds it. The maven plugin jar is a different matter for some reason though…
Advertisement
Answer
I just fixed. It was something really silly. I found out that for plugins one needs to define a plugin repository section.
<pluginRepositories> <pluginRepository> <id>kotlin-bintray</id> <name>Kotlin Bintray</name> <url>http://dl.bintray.com/kotlin/kotlin-dev</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories>
And now it works. I guess I should spend more time learning maven in depth 🙂