Maven不会编译Java注释吗?
我很难让maven编译一个使用Java注释的项目。我收到以下错误消息:
annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations)
@PostConstruct
在我的POM中,我有下面的编译器插件,那么从哪里开始呢?源代码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>
我怀疑我可能错过了一些非常简单的方法来让它工作,但谷歌搜索错误并没有带来任何帮助
任何帮助都将不胜感激
# 1 楼答案
确保
<plugin>
元素位于<build>
节中,而不仅仅是在<pluginManagement>
或<reporting>
节中