![](/img/trans.png)
[英]using same resource location executing and building a maven2 java jar project
[英]Issus with building the java project using maven2
我正在使用maven2来构建java项目,当我发出命令mvn clean install
时我得到的错误could not parse error message: (use -source 5 or higher to enable generics)
。
在我的eclipse环境中,我正在使用jdk 1.7,项目工作正常。 当我想构建项目时,我无法做到这一点,想想maven默认使用java版本1.3。
任何人请帮我如何在maven中将jdk versio设置为1.7,以便成功构建项目..
除了在pom.xml中提到的jar我想添加我自己的jar,我怎么能在pom xml中指定?
提前致谢..
在你的pom.xml中配置maven-compiler-plugin使用1.6:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.