IntelliJ maven import setting project compiler arguments

We have a large multi-module maven project, where some modules target jdk 5 and the rest jdk 6. The problem is that IntelliJ detects compiler parameters from the poms when importing changes in them, and sets the project compiler command line arguments to -target 1.6. I was first hoping that removing the <target/> tags from the maven-compiler-plugin would make IntelliJ not to set the compiler parameter, but it does, I guess IntelliJ reads/resolves the target from the <executable/> tag. This obiviously breaks compilation in IntelliJ, since I've configured the module sdk in IntelliJ for the jdk 5 modules to use the jdk 5.

Is there some way I can tweak the way IntelliJ imports the poms to not set the compiler command line argument?

Please sign in to leave a comment.