Hi I have a multimodule Maven project and i installed Java1.5 and Java1.6 in my Windows machine and Path set for Java1.6 in Environment variable(For Eclipse Juno).But i will want to run maven command with Java5 only.How can i set in Parent project pom to use Java5 only for compiling Java files .I added these lines in parent pom.xm file.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<compilerId>eclipse</compilerId>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
But i am getting error in chile project pom.xml file
Plugin execution not covered by lifecycle configuration:
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
(execution: default-testCompile, phase: test-compile)
Please use Plugin_Management instead of Plugins declaration this declaration need to inherit plugins configuration to child projects (http://maven.apache.org/pom.html#Plugin_Management)
in you case it will be looks in the following manner:
parent pom.xml
child pom.xml
Also it is possible to set the following properties in parent pom.xml