I face an issue that seems to be resolved here Mine is an aspect that needs AspectJ. There is a
> "if()"
condition in my aspect.
I have enabled this plugin.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
</plugin>
Plugin Management sections has this.
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</execution>
</executions>
<configuration>
<showWeaveInfo>true</showWeaveInfo>
<complianceLevel>1.8</complianceLevel>
<!--<sources>
<source>
<basedir>src/main/java</basedir>
<includes>
<include>**/MyAspect.java</include>
</includes>
</source>
</sources>-->
</configuration>
</plugin>
The error is this.
[INFO] --- aspectj-maven-plugin:1.8:compile (default) @ enterprise ---
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[WARNING] Field value processing of @ConfigurationProperty meta-data is not supported
<unknown source file>:<no line information>
[ERROR] Internal compiler error: java.lang.IllegalStateException: Failed to write metadata at
org.springframework.boot.configurationprocessor.ConfigurationMetadataAnnotationProcessor.writeMetaData(ConfigurationMetadataAnnotationProcessor.java:385)
If I add an empty <sources/>
tag the plugin does not find any AspectJ code to compile.
If I add the entire <sources/>
tag as shown above I get the same error again.
The only alternative I see is to go for AspectJ LTW configuration which is not needed here. Any advice ?
Update: I am using LTW now which isn't straightforward. But still I didn't understand this problem with compilation.