Vaadin and AspectJ - main() or init() - compilers integration


I’ve started a Vaadin project to try AspectJ with Vaadin and I realized that AspectJ compiler needs or search after the main() structure in the main class, where Vaadin uses an init() structure instead. Therefore AspectJ compiler reports an error which says “Lunch Error - Selection does not contain a main type”.

I added an empty main() structure to the main class to avoid this error, which also worked but just to avoid the error, there happens nothing more. The code in the init() structure won’t be executed.

I searched on the Internet for anything and tried to figure it out how I can connect both compilers with a bridge together, no result!

I will be thankful for any help! Reza

Also, I’ve tried many different things even adding AspectJ dependency to the pom.xml, however, it didn’t work.
I’ve tried again with adding AspectJ dependency and it did work. I don’t know where was the problem at the first try, maybe it came from Eclipse.
I should have only added this dependency to the pom.xml,