source 1.3(使用-source 5或更高版本来启用泛型)

d-m*_*man 9 java maven-2 bamboo

我正在使用Maven 2.x,Atlassian Bamboo和maven插件我的构建jdk配置设置为1.6,我在pom.xml文件中没有任何jdk版本强制设置.

当我在我的IDE中编译项目时它工作正常,但当我在竹编译时,它给我跟随错误.

我已经在任务中检查了我配置的jdk版本是1.6,我也尝试从pom中的maven插件强制执行jdk版本但是也没有用.你们中的某些人可能知道这里发生了什么?

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

in -source 1.3
(use -source 5 or higher to enable generics)
        List<String> matchedList = findMatchPhrase(keyword, expression);


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
Run Code Online (Sandbox Code Playgroud)

ada*_*shr 15

将以下属性添加到您的pom.xml.

<properties>
    <maven.compiler.target>1.6</maven.compiler.target>
    <maven.compiler.source>1.6</maven.compiler.source>
</properties>
Run Code Online (Sandbox Code Playgroud)