Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible for IDE's to resolve Scala classes in Java using Maven?

I have a project with mixed Java and Scala sources, following the instructions on this page, which works when running Maven from the command line.

However, people using IDEs like IDEA and Netbeans have problems resolving Scala classes in Java code (but not the other way around, thanks to the nice plugins available). Is there a way to resolve them?

Note: I can build from the command line just fine; the Scala classes are compiled before the Java classes. I just want the IDE to recognize this as well. I could create a separate module for the Scala classes to resolve this problem, but it seems like overkill to me.

Note: In IDEA, I have "Compile Scala classes first" and that still does not do the trick.

Update: Here are the versions I'm using: scala-library 2.8.0 maven-scala-plugin 2.12 IDEA 9.0 Ultimate with latest scala plugin from plugin repos Netbeans 6.9 with scala nightly plugin

like image 964
retiman Avatar asked Dec 14 '25 20:12

retiman


1 Answers

Which versions (of Scala, the IDEs, the Scala plugins) are you using?

I had the same issues when I started using Scala 2.7 around 9 months ago. While I haven't tried a mixed project recently, my understanding was that the issues would be resolved in Scala 2.8. It may be worth trying Eclipse 3.5.2 with Scala 2.8 -- my impression is that the Eclipse plugin is keeping up with changes in 2.8 better than the other IDE plugins (but I could be wrong).

like image 84
Aaron Novstrup Avatar answered Dec 17 '25 16:12

Aaron Novstrup



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!