The Issue
When I cloned the AngularJS Seed project from GitHub, and imported to eclipse, the project will use JRE 1.5.
The Solution
The problem is that pom.xml file did not provide the maven compile plugin.
Here is the update version of pom.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | <!--xml version= "1.0" encoding= "UTF-8" ?--> <project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelversion>4.0.0</modelversion> <groupid>angularjs-maven-tomcat-seed</groupid> <artifactid>angularjs-maven-tomcat-seed</artifactid> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <build> <!-- To define the plugin version in your parent POM --> <pluginmanagement> <plugins> <plugin> <groupid>org.apache.tomcat.maven</groupid> <artifactid>tomcat7-maven-plugin</artifactid> <version>2.2</version> </plugin> </plugins> </pluginmanagement> <!-- To use the plugin goals in your POM or parent POM --> <plugins> <plugin> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.2</version> <executions> <execution> <id> default -testCompile</id> <phase>test-compile</phase> <goals> <goal>testCompile</goal> </goals> <configuration> <source>1.7 <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </execution> <execution> <id> default -compile</id> <phase>compile</phase> <goals> <goal>compile</goal> </goals> <configuration> <source>1.7 <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </execution> </executions> <configuration> <source>1.7 <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupid>org.apache.tomcat.maven</groupid> <artifactid>tomcat7-maven-plugin</artifactid> <version>2.2</version> </plugin> </plugins> </build> </project> |