try using a newer version of the maven compiler plugin:
<plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin>
also, specifying source file encoding in maven is better done globally:
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
EDIT: as this answer is still getting attention i'd just like to point out that the current latest values are 3.1 for maven compiler plugin and 1.8 for java, as questions about compiling java 8 code via maven are bound to appear soon :-)
Read full article from Compiling Java 7 code via Maven - Stack Overflow
No comments:
Post a Comment