1
我使用scala-maven-plugin
使用Maven构建Scala项目。我的项目依赖于来自Java 8的一些库。我想在我的pom中指定该项目需要Java 8(使用类似于-target=jdk-1.8
的东西,它似乎不存在),以便在某人遇到某人时会更优雅/尝试使用Java版本<进行编译8.目前,它只是无法找到我想要导入的包。要求Java 8使用Maven构建Scala项目
我试着用source
和target
设定的附加maven-compiler-plugin
〜1.8,因为scala-maven-plugin
正在处理编译,而不是maven-compiler-plugin
这并不工作,大概。
这可能吗?
您是否试过这个? http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html – Bruno
我有,它不工作,大概是因为scala-maven-plugin处理编译(我甚至没有我的原始pom中的maven-compiler-plugin)。感谢您指出这一点,我会将其添加到我的问题。 –
http://davidb.github.io/scala-maven-plugin/compile-mojo.html#jvmArgs – cchantep