Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problem in adding aspect in a Java Project.

The project must use the AspectJ compiler to build or the aspects will
have no effect.  In order to use the AspectJ compiler, the project
needs the AspectJ nature (ie. it needs to be an AspectJ project).  In
a pure java project, you may write aspects in .aj files, or annotation
style aspects in .java files, but they won't do anything until a
compiler is being used that recognizes them.

Is there a reason you cannot convert it into an AspectJ project?

You could mess around and create an Ant build step in your java
project that calls the aspectj weaver, but it would be rather ugly and
you wouldn't get the UI feedback about what aspects match where (and
you wouldn't get proper incremental compilation either).

Andy

2010/1/19 Yogesh Patil <patilyogeshp@xxxxxxxxx>:
> I do not want to convert Java Project into AspectJ project... I want to add
> aspects in existing Java Project without converting it into AspectJ project.
>
> Is it possible by any means to add aspects to Java Project?
>
>
> --
> Regards,
> Yogesh.
>
> On Tue, Jan 19, 2010 at 10:20 PM, Simone Gianni <simoneg@xxxxxxxxxx> wrote:
>>
>> Roger Huang wrote:
>>>
>>> Yogesh,
>>>
>>> Try this:
>>>
>>> File > New > Other...
>>>
>>> AspectJ > AspectJ Project
>>>
>>
>> With which you create a new AspectJ project. Otherwise you can convert the
>> existing java project in an AspectJ project, by right clicking on the
>> project, the selecting Configure -> Convert to AspectJ project.
>>
>> In both cases, you need to have AJDT installed, which is the Eclipse
>> plugin for aspectj.
>>
>> Simone
>>
>> --
>> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
>> http://www.simonegianni.it/
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top