First Kotlin steps (maven question)

I’m aiming to learn Kotlin - I’ve loved what I’ve seen so far. I created a Maven project using the jetbrains-kotlin-jvm maven artefact, tried to build, and immediately get an error:

Please add kotlin-script-runtime.jar to the module dependencies

why would something so basic be missing? I’d like to end up with a working Maven project, use apache POI and some data science kotlin modules and get started… but my Maven is very rusty so looking to have a guided setup that works as far as possible.

Any advice?

Hello. What do you mean by “jetbrains-kotlin-jvm maven artefact”? You can create a new Maven project with Kotlin support with Intellij IDEA “File | New | Project | Maven | Create from archetype | kotlin-archetype-jvm”, it should work correctly.

See also: https://kotlinlang.org/docs/reference/using-maven.html

Sorry, meant archetype not artefact - and kotlin-archetype-jvm was the one I used. A simple println didn’t work but I found that IntelliJ suggested the fix which was to add

kotlin-script-runtime
1.3.72

to my Pom.xml