Maven: mixing Java and Scala in one project

后端 未结 1 454
借酒劲吻你
借酒劲吻你 2020-12-16 13:51

Today I\'ve been trying to find a proper solution to set up a maven project that contains both Java and Scala code (with two-way dependencies between them).

The sol

1条回答
  •  星月不相逢
    2020-12-16 14:17

    • Yes, the solution is "hacky" but maven-compiler-plugin is always the first plugin to run in compilation phase (it's like hard coded into maven).
    • I didn't test with scala 2.11, but previous version of scalac doens't compile .java into .class (only parse them). and scala-maven-plugin is made to run with "every version of scala" since 2.7.

    0 讨论(0)
提交回复
热议问题