简体   繁体   中英

Scala project in Intellij

I have come back to Scala after a while and I currently work on Mac. I have installed Scala 2.13.1 via brew and IntelliJ Ultimate 2019.1.3 is my IDE of choice (of course together with the Scala plugin ). I am familiar with how to setup your Scala project in Intellj and I am not looking to use sbt, but simply to have a Scala starter project and then use Maven via the Add Framework Support option . When I go through the creation of the new project, I am presented with the following:

在 IntellJ 中创建一个 Scala 项目

I would expect one of the option being simply 'Scala', but it is not there anymore. If I pick Lightbend I can kind make it work (although I need to remove the build.sbt file and add Maven), but if I pick the option called 'IDEA' (IDEA-based Scala project), it simply create a project with the following structure (which is not a Scala project at all):

在此处输入图片说明

I think I am missing something here, can you please help?

Thank you

So, I believe that the quickest solution to this issue is to create a Maven project of the following archetype:

<artifactId>scala-archetype-simple</artifactId>

That will create a proper scala maven project structure and if the rest is all set up appropriately (eg Scala SDK etc), then it will work and compile fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM