I use AspectJ via its plugin in a Java8 project, with this configuration in my pom.xml file:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<Xlint>warning</Xlint>
<XaddSerialVersionUID>true</XaddSerialVersionUID>
<encoding>UTF-8</encoding>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
<warn>constructorName,packageDefaultMethod,deprecation,maskedCatchBlocks,unusedLocals,unusedArguments,unusedImports,all</warn>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.8.0</version>
</dependency>
</dependencies>
</plugin>
I get some warnings such as the following:
[WARNING] Unnecessary @SuppressWarnings("unused")
[WARNING] Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
[WARNING] The import org.acmsl.queryj.metadata.DecoratorFactory is never used
[WARNING] The method buildMetadataManagerKey() from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] The method buildCustomSqlProviderKey() from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
[WARNING] Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
[WARNING] The method retrieveHeaderFromFile(QueryJCommand, FileUtils) from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] The method buildBasePackageNameKey() from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] The method buildRepositoryNameKey() from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] The method buildJndiLocationKey() from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] The method getBooleanValue(QueryJCommand, String) from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] The expression of type Boolean is unboxed into boolean
[WARNING] The method toCsv(List<Attribute<String>>) from the type AbstractQueryJTemplateContext can potentially be declared as static
[WARNING] Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
[WARNING] Empty block should be documented
[WARNING] Empty block should be documented
[WARNING] Redundant specification of type arguments <String, STGroup>
[WARNING] Unnecessary semicolon
[WARNING] The method retrieveUncachedGroup(String, List<String>, STErrorListener, Charset) from the type STUtils can potentially be declared as static
[WARNING] The method PerCommentTabIsaVisitor.visitTabIsa(PerCommentParser.TabIsaContext) is overriding a method without making a super invocation
[WARNING] Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
[WARNING] Unnecessary @SuppressWarnings("unused")
[WARNING] Unnecessary @SuppressWarnings("unused")
[WARNING] The method AbstractBasePerCustomResultTemplate<C>.buildHeader() is overriding a method without making a super invocation
But they're useless since the file/line information is missing. I don't think I'm using any special customization regarding Maven's logging format, which could be swallowing the context I'm interested in. Is this the default ajc logging? Can it be customized?