[ 
https://issues.apache.org/jira/browse/MNG-5603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MNG-5603.
-------------------------------
    Resolution: Auto Closed

This issue has been auto closed because it has been inactive for a long period 
of time. If you think this issue still applies, retest your problem with the 
most recent version of Maven and the affected component, reopen and post your 
results.

> Excludes tags result in unprovoked ClassNotFound Exceptions
> -----------------------------------------------------------
>
>                 Key: MNG-5603
>                 URL: https://issues.apache.org/jira/browse/MNG-5603
>             Project: Maven
>          Issue Type: Bug
>            Reporter: jay vyas
>            Priority: Major
>
> 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
(v7.6.3#76005)

Reply via email to