Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.4
-
Fix Version/s: 1.5
-
Labels:None
-
Number of attachments :
Description
When trying to set the source code to 1.7 the plugin ignores it and uses a lower than 1.5 source code compliance level (that is, it treats code with generics as an error). This prevents me from using the new 1.7 features such as the switch statement with strings, or the try-with-resources.
My plugin configuration is this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<outxml>true</outxml>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
<weaveDependencies>
<weaveDependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</weaveDependency>
</weaveDependencies>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
The project dependencies shows that the plugin still depends on aspectj-1.6.11, although IIRC the trunk already uses a newer 1.6.x version.
It looks like there's no 1.7 version in Maven central yet. If you need it now, you have to install a milestone version of aspectj in your repository. With a bit of luck you don't have to touch the code of the plugin, only define the new dependencies.