【发布时间】:2013-12-27 21:20:38
【问题描述】:
我对使用 maven 很陌生,我正在使用 STS 作为开发环境。我已经修改了我的 pom 文件以表明我的项目应该使用 java 7 编译,但无论我做什么,它总是将清单标记为使用 jdk 1.6。
<properties>
<java-version>1.7</java-version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<compilerVersion>1.7</compilerVersion>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
我需要做些什么才能让它知道我的项目是 1.7?这是项目清单中的文本,始终指示 1.6:
Manifest-Version: 1.0
Built-By: pao
Build-Jdk: 1.6.0_25
Created-By: Maven Integration for Eclipse
【问题讨论】:
-
我现在只想补充一点,当我运行一个 maven 包时,war 文件中的清单确实表明版本是 java 1.7,但是目录 target\m2e-wtp\web-resources 中的文件\META-INF\MANIFEST.MF 总是说 1.6....
-
请在终端发出
java -version
标签: eclipse maven build pom.xml