Reputation: 266
I recently upgraded to Maven 3.5 and Java 8 on my dev environment as I have upgraded my company's Maven-managed application from Java 6 to Java 8 on our 'master' environment. Unfortunately I have run into difficulty using this setup against older versions of the application that are set to compile against Java 6, as Maven tries to compile against the version of Java it is currently running against (in my case Java 8). I have looked into using Maven Toolchains (details here), but this won't work because a couple of our Maven plugins are not 'toolchain aware', such as the AspectJ Maven plugin, which therefore tries to compile the project against Java 8 and thus I get compile errors. I think I will have to resort to running two Maven installations side-by-side and just switch between the two. But before I do that, does anybody know of any potential solution to such a problem?
Thanks in advance
Upvotes: 4
Views: 181