Can I compile a Scala project with mixed java and scala code with dependencies both ways in Maven?

时光毁灭记忆、已成空白 提交于 2019-12-03 13:53:00

The usual Maven directory structure is

src/
  main/
    java/
      com/foo/mypackage/
    scala/
      com/foo/mypackage/

If you set things up this way then for sure you can have cross dependencies between your Java and Scala code. See the maven-scala-plugin or scala-maven-plugin pages on the topic.

I would not recommend putting Java and Scala code in the same directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!