maven 编译报错 java: -source 1.5 中不支持switch 中存在字符串

来源:互联网 发布:网络与系统攻击技术 编辑:程序博客网 时间:2024/04/30 18:15

在pom里面加上

<build>

<defaultGoal>compile</defaultGoal>
<pluginManagement>
<plugins> 
<plugin> 
<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-compiler-plugin</artifactId> 
<configuration> 
<source>1.7</source> 
<target>1.7</target> 
</configuration> 
</plugin>
</plugins>
</pluginManagement>
  </build>
0 0
原创粉丝点击