在mvn install编译的时候出现了,错误 diamond operator is not supported in -source 1.5 的错误信息:
解决方法:在pom.xml文件里面添加:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.2</version> <configuration> <defaultLibBundleDir>lib</defaultLibBundleDir> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build>
时间: 2024-10-13 15:19:07