Scala Maven project in intelliji not auto compiling on save

Hi,

 

I have spring boot project with scala inside ( I use java+scala mixed ).

 

Some screens from intellij:

Some interesting parts in pom.xml

<scala.version>3.1.1</scala.version>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala3-library_3</artifactId>
<version>${scala.version}</version>
</dependency>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.6.1</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>

Not sure why, but when I do some change in scala file, I need to click Build Project button, to see if there are some errors, for java files all works fine.

0
1 comment

ok I found..
in project settings had invalid SDK under Project and SDKs
changed both to:

now everything works fine

0

Please sign in to leave a comment.