An error is reported when executing MVN. The diamond operator is not supported in source-1.5

Specify the version of Maven and the JDK version used by Maven

Modify in pom.xml

<project xmlns="...">
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    ...
</project>

Read More: