[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Issue with incremental compilation, annotation and pointcuts

There is possibly a bug here, but maybe it is something subtle because
I just tried it and the scenario worked for me just fine.  It is not
really a complicated incremental build in this situation if the type
you are annotating is the type that should get woven (as opposed to a
subtype of the type that is annotated).  When you save your file with
the annotation on, it will be compiled and woven immediately.  Any
file that gets compiled is woven straightaway, the weaving is never
skipped.  So if you now have an annotation and the advice matches
based on it, the weaver will advise it.

> My guess is that adding annotation produce an incremental compilation that is
> not detected by AJDT.

You did see the file get rebuilt though, didnt you? (timestamp change
in the bin folder?)  If it was rebuilt and the project is an AspectJ
project, the weaver will have run.

Perhaps raise a bug and we can investigate further.

Andy

On 20 October 2010 08:12, Julien HENRY <henryju@xxxxxxxx> wrote:
> Hi,
>
> I have reported an issue on the forum [1] and I was requested to tell it here
> also.
>
> We are using Maven, Eclipse, M2Eclipse, AJDT and M2Eclipse-ajdt.
>
> We have developed a JAR library that contains an Aspect (java aspect using
> @Aspect). The pointcut of this aspect tell the aspect should apply to all
> methods with @ApplyAspect custom annotation.
>
> Now we are developing a project that depends on the aspect library. AJDT
> configuration is automatically done by m2eclipse-ajdt.
>
> In this project we wrote some classes and methods but initially without the
> @ApplyAspect annotation. The project compiled fine, then we decided to add the
> annotations (adding annotation was the only change). So we discovered that the
> aspect was not applied until we did a project->clean.
>
> My guess is that adding annotation produce an incremental compilation that is
> not detected by AJDT. Cleaning the project force a full compilation so this time
>
> AJDT "see" the annotation and apply the aspect.
>
> Do you confirm this is a bug? Should I open an entry in bugzilla?
>
> Regards,
>
> Julien
>
>
> [1]
> http://www.eclipse.org/forums/index.php?t=msg&goto=633979&S=89fc9db724edf4c5b469758e4dffa633#msg_633979
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>