I wrote a benchmark using JMH and when building I get the following a compilation failure
lambda expressions are not supported in -source 1.6
[ERROR] (use -source 8 or higher to enable lambda expressions)
JAVA_HOME is set to jdk1.8_40.
 I have tried changing target and source in the pom.xml in jmh source folder jmh-core :
       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <compilerVersion>1.8</compilerVersion>
                <source>1.8</source>
                <target>1.8</target>
                <compilerArgument>-proc:none</compilerArgument>
            </configuration>
        </plugin>
But I still get the same error
 
    