Hi
I found the problem. In my maven pom I have the following:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${aspectj.maven.plugin.version}</version>
<configuration>
<complianceLevel>1.8</complianceLevel>
<includes>
<include>**/*.java</include>
<include>**/*.aj</include>
</includes>
<aspectDirectory>src/main/aspect</aspectDirectory>
<!-- <testAspectDirectory>src/test/aspect</testAspectDirectory>-->
<XaddSerialVersionUID>true</XaddSerialVersionUID>
<showWeaveInfo>true</showWeaveInfo>
<aspectLibraries>
<aspectLibrary>
</aspectLibrary>
</aspectLibraries>
</configuration>
<executions>
<execution>
<id>compile_with_aspectj</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<execution>
gives the following error
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.10:compile (execution: compile_with_aspectj, phase: compile)
I I do "Quick fix " in Eclipse it suggests:

I select "Discover new m2e connectors".

I select "Finish".


Will this only work for version 1.8.1 of AspectJ?
//mikael
Från: Andy Clement <andrew.clement@xxxxxxxxx>
Skickat: den 29 september 2017 17:10
Till: Mikael Petterson
Kopia: aspectj-users@xxxxxxxxxxx
Ämne: Re: [aspectj-users] How to get the enclosing class in a Pointcut
I wouldn't expect to see anything on inpath/aspectpath normally (unless you are binary weaving). When I mentioned checking the builder you need to check under 'builders' on the left in your first screenshot and make sure it says AJBuilder. Turning on the weave
info messages is, i think, somewhere in the Information section of that AspectJ compiler options (second screenshot). I presume the builder is probably right or you'd get errors on your aspect keywords in the source.
Building with maven is fine. It is the job of the AJDT Configurator to map your maven settings onto the correct project settings when you pull the project in.
If you create a new AspectJ project in eclipse and paste in that code from above, does it compile and behave as expected? Can then compare the settings on that project with your imported project.
cheers,
Andy