how to add maven framework to a scala project


I'm new to IntelliJ and Scala.

I've created a simple hello world project and have a scala object created in the source directory.

My question. How do I correctly add a maven framework pom file to the proejct?

I want to try this example

but I need to add the maven dependency for the "Dispatch library" to a pom file.

I have tried right clicking on project name > add framework support > select maven. But when I do this, I can no longer create a scala class, the only options are to create a scala worksheet and scala script.

Thank you

1 comment
Comment actions Permalink

You need to create maven project and in this maven project you need to configure maven scala plugin ( Scala plugin for IntelliJ IDEA will handle it, and Scala will be added to your maven project. Then you will be able to create scala classes. There is no simpler way to do it, just probably you can try to use SBT instead of Maven.

Best regards,
Alexander Podkhalyuzin.


Please sign in to leave a comment.