Compile Maven Module with Different Java Version

后端 未结 3 648
夕颜
夕颜 2020-12-01 04:49

My maven project has a few modules: server, web, etc.

I would like to build all but my server module on Java 6. For the server module, I\'d like to compile it with J

3条回答
  •  醉梦人生
    2020-12-01 04:56

    use the setup for the JDK6 on your top pom, it will be inherited by all the module, and overwrite it for your server pom with the different configuration required.

    As for the path of the JDK, you can specify it, see here: http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html

提交回复
热议问题