通过命令行执行Maven项目时出错

时间:2019-06-06 04:15:50

标签: selenium-webdriver

通过命令行执行Maven项目时出错

为Apache Maven 3.6.1配置了环境变量

[错误]无法在项目LMS_APAC上执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:compile(默认编译):编译失败 [错误] / C:/ T440便携式计算机数据/硒/工作区/LMS_APAC/src/main/java/LMS_APAC/Pages/LeavedetailsReportpage.java:[-1.5版]不支持[21,60]菱形运算符 [错误](使用-source 7或更高版本启用菱形运算符)

下面是.POM代码以供参考

@Effect()
    getMemberInfo$: Observable<Action> = this.actions$
    .ofType<memberAction.GetMember>(
        memberAction.MemberActionTypes.GetMember
    )
    .switchMap((action) => {
        let obs;
        this.store.select(getMember).take(1).subscribe(res => {
            const existsInStore = res.length > 0;
            if (existsInStore) {
              let member: IMember = res.find(x => x.id === action.payload);
              member = {
                  ...member
              };

              obs = new memberAction.GeMemberSuccess(member);
            } else {
              obs = this.memberService.getMember(action.payload)
                .map(member => {
                    return new memberAction.GeMemberSuccess(member);
                });
            }

        });
        return obs;
    });

1 个答案:

答案 0 :(得分:0)

它只是说您的计算机上有Java 5(不确定),但是您想编译具有Java 7语法的代码。下载JDK的较新版本。 这里: Oracle JDKOpen JDK