Right now when I create a empty simple maven project it defaults to java 1.5. I know I can change that in the pom, but I want to have it default to at least java 8 when It is created, so I don't have to do that.
How do I do that? I've not really found an answer any place. It it even possible?
Have you tried specifying the compiler version properties?
posted 1 month ago
I know I can do that. HOWEVER, I don't want to have to do that. Plus, I still have to change the jre in the build properties. I want it to automatically use the java that I have specified in Eclipse when I create the project. Or even in some settings file somewhere.
Ron McLeod wrote:Have you tried specifying the compiler version properties?
I think the maven plugin for current release of Eclipse is using version 3.1 of maven-compiler-plugin, and it has a default value of 1.5. Even if you went to the latest, version 3.81, it has a default of 1.6.
Maybe someone else can suggest a plugin which can sync to the Eclipse's project configuration.
I think probably just changing the compiler version manually seems way easier than messing around with the plugins considering you will only do it once per project. Unless you are making tons of new projects that is.
This Stack Overflow post suggests messing with the Eclipse plugin config. I wouldn't do that though. I'd just change the pom when I create a project. or inherit from a team parent pom that already has the defaults i want.