The only way to make this a permanent change is to edit the Maven compiler plugin POM entry and force Eclipse and Maven to use Java 1.8. So the problem seems to come from Java version, but I confugred Maven Runner to use java 11 specifically. My version of intelliJ is. org.apache.maven.plugins maven-compiler-plugin 3.8.0. Question: Showing two versions like 49, 52 when I check java major version using javap. With Maven Toolchains applied to JDK toolchain, a project can now be built using a specific version of JDK independent from the one Maven is running with. 11 $ ... You can get rid of main class specified with the module parameter if set module … Requesting you to suggest me what could be the wrong? The name of the JAR file will be based on the project’s and .For example, given the minimal pom.xml file from before, the JAR file will be named gs-maven … I suspect that whatever is interpreting the Java source/target version doesn't know to look for 11, sees a value it doesn't recognize, and then falls back to targeting the default source/target version (1.5? In this article, see a guide for supporting multiple versions of Java in your Maven project. As soon as a new Maven build takes place, the JDK version reverts back to 1.5. The package goal will compile your Java code, run any tests, and finish by packaging the code up in a JAR file within the target directory. I need both of them for different projects. Maven. As you are probably still using Java 8 for the majority of your projects, you don't want to modify the JDK Maven is using just to test out Java 11. A family guy with fun loving nature. In Java 11, JAXB has been removed from JDK and we need to add it to the project as a separate library via Maven or Gradle. [Maven - Java Version] 如何设置Maven的Java版本或者使用不同的JDK版本编译 In pom.xml , defined this maven.compiler.source properties to tell Maven to use Java 8 to compile the project. Think how JDK versions can be set in IDEs like IDEA, NetBeans and Eclipse, or how you can compile with an older JDK from Maven running with a recent one. Find me on Facebook and Twitter. Java 11 is supported by Maven by using at least the 3.8.0 version of the Maven Compiler Plugin. Do I miss something for Maven configuration ? Guide for Supporting Multiple Versions of Java (8, 11, 14) in Your Maven Project - DZone Java Java Zone Prerequisites. ). Unmarshalling is the process of reading XML documents into Java objects. On my machine I have two java versions installed: (1.6 and 1.7 installed manually by me). In Java 9, JAXB has moved into a separate module java.xml. Love computers, programming and solving everyday problems. In order to compile your project for Java 11 add the release configuration to the compiler plugin, a new compiler parameter to replace the source and target version parameters: Regards, Munivelu. You can use the Maven … Configure plugins for Java 11# The most important plugins for Java 11 are the compiler plugin, surefire (for unit-tests) and failsafe (for integration-tests). When the maven-compiler-plugin's source and target attributes are set from 11 down to 10, however, all the issues go away. Some developers try and change the Java compiler setting within Eclipse from Java 1.5 to Java 1.8, but that only works temporarily. Hi, I am using java8 , maven 3.5.2 version and using below configuration in pom.xml for compile java. In Java 9 and Java 10 we need to use the --add-modules=java.xml.bind option. 1.8 1.8.