当我在 Netbeans 中构建和运行我的程序时,它可以正常工作。但是当我尝试“mvn compile”时使用相同的 pom.xml 文件,我收到此错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project hadoop-test: Compilation failure
[ERROR] /home/metin/NetBeansProjects/hadoop-test/src/main/java/com/citusdata/hadoop/HadoopTest.java:[53,8] error: generics are not supported in -source 1.3
我的java版本不是1.3,这里是“mvn -version”的结果
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_03, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-27-generic", arch: "amd64", family: "unix"
这是第 53 行:
Token<BlockTokenIdentifier> token = locatedBlock.getBlockToken();