Thank you for pointing me toward the project source, very enlightening
indeed.
Exclusion work for aspects coming from the code, no doubt.

But it doesn't seem to apply on library included aspects.

But alas, no test tries to perform an exclusion on an aspect included in an
AspectLibrary.

I'd be willing to add a test that would try to perform this, but
unfortunately I'm not familiar with maven plugin building and the invoker.

Could you please tell me how I can launch a single it test?
Something equivalent to the regular `mvn test -Dtest=<testname>` maybe ??

-nodje


Robert Scholte wrote:
> 
> 
> Hi, 
>  
> quite often it's just a configuration-problem or a typo. The exclusion
> looks ok (I can't check the typo's of course).
> Exclusion should work: here's an integration-test which tests it[1]
> If you run maven with an extra '-X' you should see with which arguments
> aspectj is executed. That could help as well.
>  
> -Robert
>  
> [1]
> http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-plugin/src/it/ExclusionsAntStyle/
>  
>> Date: Sun, 20 Mar 2011 08:03:58 -0700
>> From: [email protected]
>> To: [email protected]
>> Subject: RE: [mojo-user] [aspectj-maven-plugin] Excluding aspect from an
>> AspectLibrary?
>> 
>> 
>> Hi Robert, 
>> 
>> sure, here comes the config, I thought it wouldn't be necessary:
>> 
>> <plugin>
>> <groupId>org.codehaus.mojo</groupId>
>> <artifactId>aspectj-maven-plugin</artifactId>
>> <version>1.3.1</version>
>> <configuration>
>> <source>1.6</source>
>> <target>1.6</target>
>> <complianceLevel>1.6</complianceLevel>
>> <encoding>${encoding}</encoding>
>> <excludes>
>> 
>> <exclude>**/JpaExceptionTranslatorAspect.aj</exclude>
>> </excludes>
>> <aspectLibraries>
>> <aspectLibrary>
>> <groupId>org.springframework</groupId>
>> <artifactId>spring-aspects</artifactId>
>> </aspectLibrary>
>> </aspectLibraries>
>> </configuration>
>> <executions>
>> <execution>
>> <goals>
>> <goal>compile</goal>
>> <!--<goal>test-compile</goal>-->
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> 
>> 
>> Robert Scholte wrote:
>> > 
>> > 
>> > Hi, 
>> > 
>> > we could help you more if you include the part of the pom where you
>> define
>> > the plugin, especially the configuration.
>> > 
>> > -Robert
>> > 
>> >> Date: Fri, 18 Mar 2011 02:44:03 -0700
>> >> From: [email protected]
>> >> To: [email protected]
>> >> Subject: [mojo-user] [aspectj-maven-plugin] Excluding aspect from an
>> >> AspectLibrary?
>> >> 
>> >> 
>> >> Hi,
>> >> 
>> >> I'm using aspectj-maven-plugin with spring-aspects as aspectLibrary.
>> >> I need to exclude some of the aspects contained in it.
>> >> 
>> >> I've been trying different matching pattern with the <excludes> tag,
>> >> without
>> >> success.
>> >> I came to the conclusion that the exclude tags only affect the waived
>> >> source
>> >> code.
>> >> 
>> >> It it really like that?
>> >> Do I have anyway to exclude an aspect from an aspectLibrary?
>> >> 
>> >> cheers
>> >> -- 
>> >> View this message in context:
>> >>
>> http://old.nabble.com/-aspectj-maven-plugin--Excluding-aspect-from-an-AspectLibrary--tp31179765p31179765.html
>> >> Sent from the mojo - user mailing list archive at Nabble.com.
>> >> 
>> >> 
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list, please visit:
>> >> 
>> >> http://xircles.codehaus.org/manage_email
>> >> 
>> >> 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/-aspectj-maven-plugin--Excluding-aspect-from-an-AspectLibrary--tp31179765p31194307.html
>> Sent from the mojo - user mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>> 
>> http://xircles.codehaus.org/manage_email
>> 
>> 
>                                         
> 

-- 
View this message in context: 
http://old.nabble.com/-aspectj-maven-plugin--Excluding-aspect-from-an-AspectLibrary--tp31179765p31208117.html
Sent from the mojo - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to