Hi 2008/11/24 Paulo Cheque <[EMAIL PROTECTED]>: > Hi, I have one library with 4 aspects, I want to select one of them to weave > my source code. Can I do it with AspectJ Maven Plugin?
No the includes and excludes settings have no effect on the aspects in the aspectpath, so you will get all of them. The reason for this is that the ajc compiler api does not expose a include exclude option, so all aspects that are added to the command will be used in weaving. > > Another question maybe pertinent: Is it possible to enable or disable an > aspect at runtime?? Yes, but that is a more aspectJ general question, but pointcuts can have "if's" where you can run code to se if the pointcut should hit or not. Well that is, the aspect would still be enabled, but it will behave like if it was disabled. see : http://www.eclipse.org/aspectj/doc/released/adk15notebook/ataspectj-pcadvice.html scroll down to the if() section > > I was expecting something like this: > > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>aspectj-maven-plugin</artifactId> > <configuration> > <aspectLibraries> > <aspectLibrary> > <groupId>my.group.id</groupId> > <artifactId>my.aspect.library</artifactId> > </aspectLibrary> > </aspectLibraries> > <include>**/MySpecificAspect.class</include> > <exclude>**/AnotherAspect.class</exclude> > </configuration> > .... > </plugin> > > Thanks in advance! > Paulo > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
