I am working on one of the modules of a multi-module project. I am developing a java plugin to deploy my gigaspace application in pre-integration-test
phase in maven.
The build happens on Teamcity and current JAVA_HOME
points to Java 6 on which whole repository is built. Now, when deploying the application in pre-integration-test
phase, it needs Java 7 because it uses some 3rd party libraries which were compiled in Java 7.
Is there any way I can somehow use Java 7 for deploying my application in pre-integration-test
phase, but use Java 6 for compilation?
It seems that this is not straightforward. If you look at the plugin goal that gets associated with the lifecycle phase named
pre-integration-test
, then perhaps you can control its execution configuration:I haven't tried it myself. Also, see another somewhat similar question and its answer here. It's also useful to run
mvn help:effective-pom
to see what is going on.