ok so I was on the right lines .. however I am using annotations and my
compile fails as shown below:
...
[INFO] [aspectj:compile {execution: default}]
[ERROR] Syntax error, annotations are only available if source level is 5.0
[ERROR] Syntax error, annotations are only available if source level is 5.0
[ERROR] Syntax error, annotations are only available if source level is 5.0
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Compiler errors :
error at @Aspect
^^^^^^
C:\aop-aspects\src\main\java\aspects\AppAspect.aj:27:0::0 Syntax error,
annotations are only available if source level is 5.0
error at @Pointcut("initialization(foo.App.new(..))")
^^^^
C:\aop-aspects\src\main\java\aspects\AppAspect.aj:30:0::0 Syntax error,
annotations are only available if source level is 5.0
error at @AfterReturning("appConstructor()")
^^^^^^^^^^
C:\aop-aspects\src\main\java\aspects\AppAspect.aj:33:0::0 Syntax error,
annotations are only available if source level is 5.0
...
I have tried directing the compiler with the following:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
but still get the failure