[英]Maven won't compile Java annotations?
I'm having trouble getting maven to compile a project that uses Java annotations. 我很难让maven编译一个使用Java注释的项目。 I get the following error message:
我收到以下错误消息:
annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations)
@PostConstruct
In my POM I have the following compiler plugin so for a start where is it getting -source 1.3 from? 在我的POM中,我有以下编译器插件,所以首先从它获取-source 1.3?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
I suspect I am probably missing something very simple to get this working but googling the error doesn't bring up anything helpful 我怀疑我可能错过了一些非常简单的工作,但谷歌搜索错误并没有带来任何帮助
Any help would be greatly appreciated 任何帮助将不胜感激
确保<plugin>
元素位于<build>
部分内,而不仅仅是<pluginManagement>
或<reporting>
部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.