java - Maven build failure -
i'm trying build maven application, error message:
[error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project helloworld: compilation failure
[error] d:...\spark-test\java-getting-started\src\main\java\main.java:[73,35] error: lambda expressions not supported in -source 1.5
it's heroku example java project, , in system.properties file java version set: java.runtime.version=1.8
the specific lines these:
get("/login", (request, response) -> { system.out.println("request: " + request); return "hello world spark"; });
i don't understand problem, or set source java 1.5
try adding pom.xml:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin>
somehow maven tries compile against java 1.5, did not have lambdas yet (only since 1.8). how starting build? maven command line or ide?
Comments
Post a Comment