I'm having trouble getting maven to compile a project that uses Java annotations. 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?
<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
Make sure that your <plugin> element is inside <build> section and not only in <pluginManagement> or <reporting> sections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With