【发布时间】:2013-01-26 08:11:46
【问题描述】:
如何强制maven编译1.6兼容源码
我在 Eclipse 中使用 maven 制作了 web-app 项目。将 web.xml 更改为使用 3.0 版本 -> 然后更新配置,现在我无法启动 tomcat。 我发现我必须强制 maven 编译源 1.6 兼容,我必须添加
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<executable>${env.JAVA_HOME_7}/bin/javac</executable>
<fork>true</fork>
</configuration>
但是eclipse中的有效pom是不可编辑的
那么有没有兼容eclipse的maven或者其他强制maven编译源码1.6版本的方法?
【问题讨论】: