[ 
https://jira.codehaus.org/browse/MNG-5603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=343259#comment-343259
 ] 

jay vyas commented on MNG-5603:
-------------------------------

FYI any one looking for some SO points, i originally posted this here: 
http://stackoverflow.com/questions/22498586/maven-surefire-exclusion-is-it-buggy

> Excludes tags result in unprovoked ClassNotFound Exceptions
> -----------------------------------------------------------
>
>                 Key: MNG-5603
>                 URL: https://jira.codehaus.org/browse/MNG-5603
>             Project: Maven 2 & 3
>          Issue Type: Bug
>            Reporter: jay vyas
>
> My full pom file is here for reference: 
> https://gist.github.com/jayunit100/9644221 (this is a version of hadoop that 
> im playing with in the source code).
> Ive found some very odd behaviour in surefire:
> {noformat}
> mvn test
> {noformat}
> With the following exclusion filter under the "excludes" tag:
> {noformat}
> <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-surefire-plugin</artifactId>
>     <configuration>
>       <systemPropertyVariables>
>         <startKdc>${startKdc}</startKdc>
>         <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
>       </systemPropertyVariables>
>       <properties>
>         <property>
>           <name>listener</name>
>           <value>org.apache.hadoop.test.TimedOutTestsListener</value>
>         </property>
>       </properties>
>       <excludes>
>       <exclude>asbdfoin</exclude>
>   </excludes>
>     </configuration>
> {noformat}
> Results in an exception like this:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.16:test 
> (default-test) on project hadoop-common: Execution default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.16:test failed: 
> java.lang.NoClassDefFoundError: EmptyRequestProto; nested exception is 
> java.lang.NoClassDefFoundError: EmptyRequestProto -> [Help 1]
> {noformat}
> In otherwords: Exclusion filters can result in NoClassDefFoundError messages, 
> when the exclusion filter doesn't match anything at all.
> My question : How could the maven surefire exclusion filter cause a 
> ClassNotFound error to manifest ? If anything, I would expect it to REDUCE 
> the amount of attempts to load classes, not increase them.
> FYI, some color on this: The class which is causing this "NotFound" exception 
> itself is an inner class:
> {noformat}
> public static final class EmptyRequestProto extends 
> com.google.protobuf.GeneratedMessage
> {noformat}
> I have seen SUREFIRE-988‎, and possibly its related, but I the fact that my 
> "exclude" filter doesnt match ANY class in the code base, it might be 
> distinct.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to