Maven+AspectJ
Hi,
I faced a problem using using AspectJ compiler Maven Plugin. After hours of googling I didn't manage to make it work for my aspects, however my AJDT eclipse pluging compiles and works with aspects perfectly.
While running maven i get such warning:
[WARNING] advice defined in test.package.MyTest$TestAspects has not been applied [Xlint:adviceDidNotMatch]
pom.xml:
<plugins>
***
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<source>1.6</source>
<complianceLevel>1.6</complianceLevel>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
</dependencies>
</plugin>
***
</plugins>
</build>
<dependencies>
***
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.5</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
***
</dependencies>
Aspect:
@Aspect
static class TestAspects{
@Pointcut("call(String some.package.PropertyProvider.getStringProperty())")
public void interceptStringProperty(){}
@Around("interceptStringProperty()")
public String interceptConstructorForStringProperty()
{
return "Intercepted String Property";
}
}
Can anybody help me?
Thanks.

Comments
Can you provide maven debug log ? (-X directive)
try to sync AJDT setting with maven using http://mojo.codehaus.org/aspectj-maven-plugin/usingTogetherWithAJDT.html
Dose the some.package.PropertyProvider in the classpath that you try to wave ?